diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java index b872af821..6023cdf34 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCompost.java @@ -83,7 +83,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ if(!player.capabilities.isCreativeMode){ player.inventory.getCurrentItem().stackSize--; } - tile.sendUpdate(); + tile.markDirty(); } //Add Fertilizer to player's inventory @@ -95,7 +95,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{ player.getCurrentEquippedItem().stackSize += tile.slots[0].stackSize; } tile.slots[0] = null; - tile.sendUpdate(); + tile.markDirty(); } } return true; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index 174b604d9..74d65bdc2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -113,6 +113,12 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple this.storage.writeToNBT(compound); } + @Override + public void markDirty(){ + super.markDirty(); + this.sendUpdate(); + } + @Override public boolean shouldSyncSlots(){ return true; @@ -125,18 +131,6 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple this.storage.readFromNBT(compound); } - @Override - public void setInventorySlotContents(int i, ItemStack stack){ - super.setInventorySlotContents(i, stack); - this.sendUpdate(); - } - - @Override - public ItemStack decrStackSize(int i, int j){ - this.sendUpdate(); - return super.decrStackSize(i, j); - } - @Override public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){ return this.storage.receiveEnergy(maxReceive, simulate); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java index 4f09fb2d3..969678b18 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java @@ -62,18 +62,6 @@ public class TileEntityCompost extends TileEntityInventoryBase{ this.conversionTime = compound.getInteger("ConversionTime"); } - @Override - public void setInventorySlotContents(int i, ItemStack stack){ - super.setInventorySlotContents(i, stack); - this.sendUpdate(); - } - - @Override - public ItemStack decrStackSize(int i, int j){ - this.sendUpdate(); - return super.decrStackSize(i, j); - } - @Override public int getInventoryStackLimit(){ return AMOUNT; @@ -93,4 +81,10 @@ public class TileEntityCompost extends TileEntityInventoryBase{ public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ return stack.getItem() instanceof ItemFertilizer; } + + @Override + public void markDirty(){ + super.markDirty(); + this.sendUpdate(); + } }