Fixed GUI progress for fluid generators. Some work on #1430
This commit is contained in:
parent
ce9066e546
commit
c5d162c527
1 changed files with 9 additions and 6 deletions
|
@ -75,13 +75,16 @@ public abstract class TileBaseFluidGenerator extends TilePowerAcceptor implement
|
||||||
this.ticksSinceLastChange++;
|
this.ticksSinceLastChange++;
|
||||||
|
|
||||||
// Check cells input slot 2 time per second
|
// Check cells input slot 2 time per second
|
||||||
if (!world.isRemote && this.ticksSinceLastChange >= 10) {
|
// Please, keep ticks counting on client also to report progress to GUI
|
||||||
|
if (this.ticksSinceLastChange >= 10) {
|
||||||
|
if (!world.isRemote) {
|
||||||
if (!this.inventory.getStackInSlot(0).isEmpty()) {
|
if (!this.inventory.getStackInSlot(0).isEmpty()) {
|
||||||
FluidUtils.drainContainers(this.tank, this.inventory, 0, 1);
|
FluidUtils.drainContainers(this.tank, this.inventory, 0, 1);
|
||||||
FluidUtils.fillContainers(this.tank, this.inventory, 0, 1, this.tank.getFluidType());
|
FluidUtils.fillContainers(this.tank, this.inventory, 0, 1, this.tank.getFluidType());
|
||||||
}
|
}
|
||||||
tank.setTileEntity(this);
|
tank.setTileEntity(this);
|
||||||
tank.compareAndUpdate();
|
tank.compareAndUpdate();
|
||||||
|
}
|
||||||
this.ticksSinceLastChange = 0;
|
this.ticksSinceLastChange = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue