mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +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){
|
if(!player.capabilities.isCreativeMode){
|
||||||
player.inventory.getCurrentItem().stackSize--;
|
player.inventory.getCurrentItem().stackSize--;
|
||||||
}
|
}
|
||||||
tile.sendUpdate();
|
tile.markDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add Fertilizer to player's inventory
|
//Add Fertilizer to player's inventory
|
||||||
|
@ -95,7 +95,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{
|
||||||
player.getCurrentEquippedItem().stackSize += tile.slots[0].stackSize;
|
player.getCurrentEquippedItem().stackSize += tile.slots[0].stackSize;
|
||||||
}
|
}
|
||||||
tile.slots[0] = null;
|
tile.slots[0] = null;
|
||||||
tile.sendUpdate();
|
tile.markDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -113,6 +113,12 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
||||||
this.storage.writeToNBT(compound);
|
this.storage.writeToNBT(compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void markDirty(){
|
||||||
|
super.markDirty();
|
||||||
|
this.sendUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldSyncSlots(){
|
public boolean shouldSyncSlots(){
|
||||||
return true;
|
return true;
|
||||||
|
@ -125,18 +131,6 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
||||||
this.storage.readFromNBT(compound);
|
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
|
@Override
|
||||||
public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){
|
public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){
|
||||||
return this.storage.receiveEnergy(maxReceive, simulate);
|
return this.storage.receiveEnergy(maxReceive, simulate);
|
||||||
|
|
|
@ -62,18 +62,6 @@ public class TileEntityCompost extends TileEntityInventoryBase{
|
||||||
this.conversionTime = compound.getInteger("ConversionTime");
|
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
|
@Override
|
||||||
public int getInventoryStackLimit(){
|
public int getInventoryStackLimit(){
|
||||||
return AMOUNT;
|
return AMOUNT;
|
||||||
|
@ -93,4 +81,10 @@ public class TileEntityCompost extends TileEntityInventoryBase{
|
||||||
public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){
|
public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){
|
||||||
return stack.getItem() instanceof ItemFertilizer;
|
return stack.getItem() instanceof ItemFertilizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void markDirty(){
|
||||||
|
super.markDirty();
|
||||||
|
this.sendUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue