mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-26 21:09:23 +01:00
Made compost only accept the current recipe's amount of items
This commit is contained in:
parent
dbf5a86560
commit
7749e9f67d
1 changed files with 11 additions and 0 deletions
|
@ -90,6 +90,17 @@ public class TileEntityCompost extends TileEntityInventoryBase{
|
|||
this.sendUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit(){
|
||||
if(this.slots[0] != null){
|
||||
CompostRecipe recipe = getRecipeForInput(this.slots[0]);
|
||||
if(recipe != null && recipe.input != null){
|
||||
return recipe.input.stackSize;
|
||||
}
|
||||
}
|
||||
return super.getInventoryStackLimit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int slot, ItemStack stack, EnumFacing side){
|
||||
return this.isItemValidForSlot(slot, stack);
|
||||
|
|
Loading…
Reference in a new issue