Update old tank syncing code, fixes TechReborn/TechReborn/issues/1377
This commit is contained in:
parent
e4736447bd
commit
677fa7765c
2 changed files with 6 additions and 2 deletions
|
@ -114,7 +114,7 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IToolDro
|
|||
|
||||
this.ticksSinceLastChange++;
|
||||
// Check cells input slot 2 time per second
|
||||
if (this.ticksSinceLastChange >= 10) {
|
||||
if (!world.isRemote && this.ticksSinceLastChange >= 10) {
|
||||
if (!this.inventory.getStackInSlot(1).isEmpty()) {
|
||||
FluidUtils.drainContainers(this.tank, this.inventory, 1, 6);
|
||||
FluidUtils.fillContainers(this.tank, this.inventory, 1, 6, this.tank.getFluidType());
|
||||
|
@ -125,6 +125,8 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IToolDro
|
|||
if (!world.isRemote && this.getMutliBlock()) {
|
||||
this.charge(7);
|
||||
}
|
||||
|
||||
tank.compareAndUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -119,7 +119,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IToolDro
|
|||
|
||||
this.ticksSinceLastChange++;
|
||||
// Check cells input slot 2 time per second
|
||||
if (this.ticksSinceLastChange >= 10) {
|
||||
if (!world.isRemote && this.ticksSinceLastChange >= 10) {
|
||||
if (!this.inventory.getStackInSlot(1).isEmpty()) {
|
||||
FluidUtils.drainContainers(this.tank, this.inventory, 1, 5);
|
||||
FluidUtils.fillContainers(this.tank, this.inventory, 1, 5, this.tank.getFluidType());
|
||||
|
@ -130,6 +130,8 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IToolDro
|
|||
if (!world.isRemote && this.getMutliBlock()) {
|
||||
this.charge(6);
|
||||
}
|
||||
|
||||
tank.compareAndUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue