mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-25 16:38:33 +01:00
Fix Fluid Placer not inheriting the ticking of the Fluid Collector
This commit is contained in:
parent
fd92ee8514
commit
e4fdc6d7da
1 changed files with 19 additions and 15 deletions
|
@ -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) {
|
||||
if (t instanceof TileEntityFluidCollector tile) {
|
||||
tile.serverTick();
|
||||
}
|
||||
}
|
||||
|
||||
if (!tile.isRedstonePowered && !tile.isPulseMode) {
|
||||
if (tile.currentTime > 0) {
|
||||
tile.currentTime--;
|
||||
if (tile.currentTime <= 0) {
|
||||
tile.doWork();
|
||||
}
|
||||
} else {
|
||||
tile.currentTime = 15;
|
||||
@Override
|
||||
protected void serverTick() {
|
||||
super.serverTick();
|
||||
if (!isRedstonePowered && !isPulseMode) {
|
||||
if (currentTime > 0) {
|
||||
currentTime--;
|
||||
if (currentTime <= 0) {
|
||||
doWork();
|
||||
}
|
||||
} else {
|
||||
currentTime = 15;
|
||||
}
|
||||
}
|
||||
|
||||
if (tile.lastCompare != tile.getComparatorStrength()) {
|
||||
tile.lastCompare = tile.getComparatorStrength();
|
||||
if (lastCompare != getComparatorStrength()) {
|
||||
lastCompare = getComparatorStrength();
|
||||
|
||||
tile.setChanged();
|
||||
}
|
||||
setChanged();
|
||||
}
|
||||
|
||||
if (tile.lastTankAmount != tile.tank.getFluidAmount() && tile.sendUpdateWithInterval()) {
|
||||
tile.lastTankAmount = tile.tank.getFluidAmount();
|
||||
}
|
||||
if (lastTankAmount != tank.getFluidAmount() && sendUpdateWithInterval()) {
|
||||
lastTankAmount = tank.getFluidAmount();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue