Fix QuantumTank fluid updates
This commit is contained in:
parent
aa7785706f
commit
f65999f960
1 changed files with 5 additions and 4 deletions
|
@ -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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue