mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 12:19:55 +00:00
#1701 - ignore side config for interaction with buckets
This commit is contained in:
1 parent
9d0450219e
commit
35c4380d0f
2 files changed
+10
-4
No files matched your search
@@ -80,9 +80,9 @@ public class BlockTank extends AbstractMachineBlock<TileTank> implements IAdvanc
|
||||
//check for filled fluid containers and see if we can empty them into our input tank
|
||||
FluidStack fluid = FluidUtil.getFluidFromItem(item);
|
||||
if(fluid != null) {
|
||||
int filled = tank.fill(ForgeDirection.UP, fluid, false);
|
||||
int filled = tank.fillInternal(fluid, false);
|
||||
if(filled >= fluid.amount) {
|
||||
tank.fill(ForgeDirection.UP, fluid, true);
|
||||
tank.fillInternal(fluid, true);
|
||||
if(!entityPlayer.capabilities.isCreativeMode) {
|
||||
entityPlayer.inventory.setInventorySlotContents(entityPlayer.inventory.currentItem, Util.consumeItem(item));
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class BlockTank extends AbstractMachineBlock<TileTank> implements IAdvanc
|
||||
}
|
||||
|
||||
if(filled != null) {
|
||||
tank.drain(ForgeDirection.DOWN, filled, true);
|
||||
tank.drainInternal(filled, true);
|
||||
if(item.stackSize > 1) {
|
||||
item.stackSize--;
|
||||
entityPlayer.inventory.setInventorySlotContents(entityPlayer.inventory.currentItem, item);
|
||||
|
||||
@@ -126,7 +126,7 @@ public class TileTank extends AbstractMachineEntity implements IFluidHandler {
|
||||
return fillInternal(resource, doFill);
|
||||
}
|
||||
|
||||
private int fillInternal(FluidStack resource, boolean doFill) {
|
||||
int fillInternal(FluidStack resource, boolean doFill) {
|
||||
int res = tank.fill(resource, doFill);
|
||||
if(res > 0 && doFill) {
|
||||
tankDirty = true;
|
||||
@@ -139,7 +139,10 @@ public class TileTank extends AbstractMachineEntity implements IFluidHandler {
|
||||
if(!canDrain(from)) {
|
||||
return null;
|
||||
}
|
||||
return drainInternal(resource, doDrain);
|
||||
}
|
||||
|
||||
FluidStack drainInternal(FluidStack resource, boolean doDrain) {
|
||||
FluidStack res = tank.drain(resource, doDrain);
|
||||
if(res != null && res.amount > 0 && doDrain) {
|
||||
tankDirty = true;
|
||||
@@ -152,7 +155,10 @@ public class TileTank extends AbstractMachineEntity implements IFluidHandler {
|
||||
if(!canDrain(from)) {
|
||||
return null;
|
||||
}
|
||||
return drainInternal(maxDrain, doDrain);
|
||||
}
|
||||
|
||||
FluidStack drainInternal(int maxDrain, boolean doDrain) {
|
||||
FluidStack res = tank.drain(maxDrain, doDrain);
|
||||
if(res != null && res.amount > 0 && doDrain) {
|
||||
tankDirty = true;
|
||||
|
||||
Reference in new issue
Block a user