mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-23 03:49:22 +01:00
parent
091b6cbfc3
commit
c92aebfe0a
3 changed files with 14 additions and 26 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue