Fix fluid replication in fluid replicator. Closes #2352
This commit is contained in:
parent
96383ebaaf
commit
bca4d88fd9
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,7 @@ package techreborn.blockentity.machine.multiblock;
|
|||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
@ -82,6 +83,10 @@ public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implem
|
|||
if (!world.isClient && ticksSinceLastChange >= 10) {
|
||||
if (!inventory.getStack(1).isEmpty()) {
|
||||
FluidUtils.fillContainers(tank, inventory, 1, 2);
|
||||
if (tank.isEmpty()){
|
||||
// need to set to empty fluid due to #2352
|
||||
tank.setFluid(Fluids.EMPTY);
|
||||
}
|
||||
}
|
||||
ticksSinceLastChange = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue