Pass "compare" flags into extractItem/extractFluid in more places (#2809)
This commit is contained in:
@@ -129,7 +129,7 @@ public class ConstructorNetworkNode extends NetworkNode implements IComparable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void extractAndDropItem(ItemStack stack) {
|
private void extractAndDropItem(ItemStack stack) {
|
||||||
ItemStack took = network.extractItem(stack, upgrades.getStackInteractCount(), Action.PERFORM);
|
ItemStack took = network.extractItem(stack, upgrades.getStackInteractCount(), compare, Action.PERFORM);
|
||||||
|
|
||||||
if (!took.isEmpty()) {
|
if (!took.isEmpty()) {
|
||||||
DefaultDispenseItemBehavior.doDispense(world, took, 6, getDirection(), new Position(getDispensePositionX(), getDispensePositionY(), getDispensePositionZ()));
|
DefaultDispenseItemBehavior.doDispense(world, took, 6, getDirection(), new Position(getDispensePositionX(), getDispensePositionY(), getDispensePositionZ()));
|
||||||
@@ -139,7 +139,7 @@ public class ConstructorNetworkNode extends NetworkNode implements IComparable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void extractAndSpawnFireworks(ItemStack stack) {
|
private void extractAndSpawnFireworks(ItemStack stack) {
|
||||||
ItemStack took = network.extractItem(stack, 1, Action.PERFORM);
|
ItemStack took = network.extractItem(stack, 1, compare, Action.PERFORM);
|
||||||
|
|
||||||
if (!took.isEmpty()) {
|
if (!took.isEmpty()) {
|
||||||
world.addEntity(new FireworkRocketEntity(world, getDispensePositionX(), getDispensePositionY(), getDispensePositionZ(), took));
|
world.addEntity(new FireworkRocketEntity(world, getDispensePositionX(), getDispensePositionY(), getDispensePositionZ(), took));
|
||||||
@@ -304,13 +304,13 @@ public class ConstructorNetworkNode extends NetworkNode implements IComparable,
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public FluidStack drain(FluidStack resource, FluidAction action) {
|
public FluidStack drain(FluidStack resource, FluidAction action) {
|
||||||
return network.extractFluid(resource, resource.getAmount(), action == FluidAction.SIMULATE ? Action.SIMULATE : Action.PERFORM);
|
return network.extractFluid(resource, resource.getAmount(), compare, action == FluidAction.SIMULATE ? Action.SIMULATE : Action.PERFORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public FluidStack drain(int maxDrain, FluidAction action) {
|
public FluidStack drain(int maxDrain, FluidAction action) {
|
||||||
return network.extractFluid(resource, resource.getAmount(), action == FluidAction.SIMULATE ? Action.SIMULATE : Action.PERFORM);
|
return network.extractFluid(resource, resource.getAmount(), compare, action == FluidAction.SIMULATE ? Action.SIMULATE : Action.PERFORM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user