diff --git a/nms-patches/ContainerCartography.patch b/nms-patches/ContainerCartography.patch index 9fa8dd76ca..84b2dea868 100644 --- a/nms-patches/ContainerCartography.patch +++ b/nms-patches/ContainerCartography.patch @@ -22,7 +22,7 @@ + return bukkitEntity; + } + -+ CraftInventoryCartography inventory = new CraftInventoryCartography(this.inventory); ++ CraftInventoryCartography inventory = new CraftInventoryCartography(this.inventory, this.f); + bukkitEntity = new CraftInventoryView(this.player, inventory, this); + return bukkitEntity; + } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java index 6cfa3d3e0a..892fc902bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java @@ -5,7 +5,15 @@ import org.bukkit.inventory.CartographyInventory; public class CraftInventoryCartography extends CraftInventory implements CartographyInventory { - public CraftInventoryCartography(IInventory inventory) { + private final IInventory resultInventory; + + public CraftInventoryCartography(IInventory inventory, IInventory resultInventory) { super(inventory); + this.resultInventory = resultInventory; + } + + @Override + public int getSize() { + return super.getSize() + resultInventory.getSize(); } }