Fix Fluid Placer not inheriting the ticking of the Fluid Collector

This commit is contained in:
Mrbysco 2024-03-10 15:44:53 +01:00
parent fd92ee8514
commit e4fdc6d7da

View file

@ -175,27 +175,31 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing
public static <T extends BlockEntity> void serverTick(Level level, BlockPos pos, BlockState state, T t) { public static <T extends BlockEntity> void serverTick(Level level, BlockPos pos, BlockState state, T t) {
if (t instanceof TileEntityFluidCollector tile) { if (t instanceof TileEntityFluidCollector tile) {
tile.serverTick(); tile.serverTick();
}
}
if (!tile.isRedstonePowered && !tile.isPulseMode) { @Override
if (tile.currentTime > 0) { protected void serverTick() {
tile.currentTime--; super.serverTick();
if (tile.currentTime <= 0) { if (!isRedstonePowered && !isPulseMode) {
tile.doWork(); if (currentTime > 0) {
currentTime--;
if (currentTime <= 0) {
doWork();
} }
} else { } else {
tile.currentTime = 15; currentTime = 15;
} }
} }
if (tile.lastCompare != tile.getComparatorStrength()) { if (lastCompare != getComparatorStrength()) {
tile.lastCompare = tile.getComparatorStrength(); lastCompare = getComparatorStrength();
tile.setChanged(); setChanged();
} }
if (tile.lastTankAmount != tile.tank.getFluidAmount() && tile.sendUpdateWithInterval()) { if (lastTankAmount != tank.getFluidAmount() && sendUpdateWithInterval()) {
tile.lastTankAmount = tile.tank.getFluidAmount(); lastTankAmount = tank.getFluidAmount();
}
} }
} }