mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Closes #1210
This commit is contained in:
parent
bfee6a1a24
commit
45cef1b4cf
2 changed files with 20 additions and 12 deletions
|
@ -138,15 +138,19 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
||||||
this.secondSmeltTime = 0;
|
this.secondSmeltTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (smelted != this.lastSmelted) {
|
IBlockState currState = this.world.getBlockState(this.pos);
|
||||||
IBlockState currState = this.world.getBlockState(this.pos);
|
boolean current = currState.getValue(BlockFurnaceDouble.IS_ON);
|
||||||
if (currState.getValue(BlockFurnaceDouble.IS_ON) != smelted) {
|
boolean changeTo = current;
|
||||||
this.world.setBlockState(this.pos, currState.withProperty(BlockFurnaceDouble.IS_ON, smelted));
|
if (lastSmelted != smelted) changeTo = smelted;
|
||||||
}
|
if (this.isRedstonePowered) changeTo = true;
|
||||||
|
if (!smelted && !this.isRedstonePowered) changeTo = false;
|
||||||
|
|
||||||
this.lastSmelted = smelted;
|
if (changeTo != current) {
|
||||||
|
world.setBlockState(this.pos, currState.withProperty(BlockFurnaceDouble.IS_ON, changeTo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.lastSmelted = smelted;
|
||||||
|
|
||||||
if ((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstSmelt != this.firstSmeltTime || this.lastSecondSmelt != this.secondSmeltTime || this.isAutoSplit != this.lastAutoSplit) && this.sendUpdateWithInterval()) {
|
if ((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstSmelt != this.firstSmeltTime || this.lastSecondSmelt != this.secondSmeltTime || this.isAutoSplit != this.lastAutoSplit) && this.sendUpdateWithInterval()) {
|
||||||
this.lastEnergy = this.storage.getEnergyStored();
|
this.lastEnergy = this.storage.getEnergyStored();
|
||||||
this.lastFirstSmelt = this.firstSmeltTime;
|
this.lastFirstSmelt = this.firstSmeltTime;
|
||||||
|
|
|
@ -132,15 +132,19 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IButto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crushed != this.lastCrushed) {
|
IBlockState currState = this.world.getBlockState(this.pos);
|
||||||
IBlockState currState = this.world.getBlockState(this.pos);
|
boolean current = currState.getValue(BlockFurnaceDouble.IS_ON);
|
||||||
if (currState.getValue(BlockFurnaceDouble.IS_ON) != crushed) {
|
boolean changeTo = current;
|
||||||
this.world.setBlockState(this.pos, currState.withProperty(BlockFurnaceDouble.IS_ON, crushed));
|
if (lastCrushed != crushed) changeTo = crushed;
|
||||||
}
|
if (this.isRedstonePowered) changeTo = true;
|
||||||
|
if (!crushed && !this.isRedstonePowered) changeTo = false;
|
||||||
|
|
||||||
this.lastCrushed = crushed;
|
if (changeTo != current) {
|
||||||
|
world.setBlockState(this.pos, currState.withProperty(BlockFurnaceDouble.IS_ON, changeTo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.lastCrushed = crushed;
|
||||||
|
|
||||||
if ((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstCrush != this.firstCrushTime || this.lastSecondCrush != this.secondCrushTime || this.isAutoSplit != this.lastAutoSplit) && this.sendUpdateWithInterval()) {
|
if ((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstCrush != this.firstCrushTime || this.lastSecondCrush != this.secondCrushTime || this.isAutoSplit != this.lastAutoSplit) && this.sendUpdateWithInterval()) {
|
||||||
this.lastEnergy = this.storage.getEnergyStored();
|
this.lastEnergy = this.storage.getEnergyStored();
|
||||||
this.lastFirstCrush = this.firstCrushTime;
|
this.lastFirstCrush = this.firstCrushTime;
|
||||||
|
|
Loading…
Reference in a new issue