diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java index 57f54be940..a91d81aeb4 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java @@ -4,7 +4,23 @@ import net.minecraft.server.IInventory; import org.bukkit.inventory.AnvilInventory; public class CraftInventoryAnvil extends CraftInventory implements AnvilInventory { - public CraftInventoryAnvil(IInventory anvil) { - super(anvil); + private final IInventory resultInventory; + + public CraftInventoryAnvil(IInventory inventory, IInventory resultInventory) { + super(inventory); + this.resultInventory = resultInventory; + } + + public IInventory getResultInventory() { + return resultInventory; + } + + public IInventory getIngredientsInventory() { + return inventory; + } + + @Override + public int getSize() { + return getResultInventory().getSize() + getIngredientsInventory().getSize(); } }