more glitch fix
This commit is contained in:
parent
198126052f
commit
58a3c6b846
1 changed files with 15 additions and 17 deletions
|
@ -68,8 +68,7 @@ public abstract class SteamEngineTileEntity extends EngineTileEntity implements
|
|||
super.tick();
|
||||
if (level != null && !level.isClientSide) {
|
||||
BlockState state = this.level.getBlockState(this.worldPosition);
|
||||
if (!tank.isEmpty()) {
|
||||
if (tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE).getAmount() >= this.getSteamConsumptionPerTick()) {
|
||||
if (!tank.isEmpty()&&tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE).getAmount() >= this.getSteamConsumptionPerTick()) {
|
||||
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, true));
|
||||
if(heatup>=20) {
|
||||
this.appliedCapacity = this.getGeneratingCapacity();
|
||||
|
@ -77,8 +76,7 @@ public abstract class SteamEngineTileEntity extends EngineTileEntity implements
|
|||
this.refreshWheelSpeed();
|
||||
}else
|
||||
heatup++;
|
||||
}
|
||||
} else {
|
||||
}else {
|
||||
if(heatup>0)
|
||||
heatup--;
|
||||
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
|
||||
|
|
Loading…
Reference in a new issue