Fix QuantumTank fluid updates

This commit is contained in:
Ourten 2016-12-16 15:11:46 +01:00
parent aa7785706f
commit f65999f960

View file

@ -58,14 +58,15 @@ public class TileQuantumTank extends TileLegacyMachineBase
public void updateEntity() { public void updateEntity() {
super.updateEntity(); super.updateEntity();
if (!world.isRemote) { if (!world.isRemote) {
FluidUtils.drainContainers(tank, inventory, 0, 1); if (FluidUtils.drainContainers(tank, inventory, 0, 1)
FluidUtils.fillContainers(tank, inventory, 0, 1, tank.getFluidType()); || FluidUtils.fillContainers(tank, inventory, 0, 1, tank.getFluidType()))
this.syncWithAll();
if (tank.getFluidType() != null && getStackInSlot(2) == ItemStack.EMPTY) { if (tank.getFluidType() != null && getStackInSlot(2) == ItemStack.EMPTY) {
// inventory.setInventorySlotContents(2, new ItemStack(tank.getFluidType().getBlock())); inventory.setInventorySlotContents(2, new ItemStack(tank.getFluidType().getBlock()));
} else if (tank.getFluidType() == null && getStackInSlot(2) != ItemStack.EMPTY) { } else if (tank.getFluidType() == null && getStackInSlot(2) != ItemStack.EMPTY) {
setInventorySlotContents(2, ItemStack.EMPTY); setInventorySlotContents(2, ItemStack.EMPTY);
} }
tank.compareAndUpdate();
} }
} }