From 7749e9f67dfbb90a3a701267895d4b4e74b04ede Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 3 Jun 2016 22:16:23 +0200 Subject: [PATCH] Made compost only accept the current recipe's amount of items --- .../actuallyadditions/mod/tile/TileEntityCompost.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 c8a4298e1..c97aae9e3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCompost.java @@ -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);