From 10043529907a4ba913ebe2712876e4b1911263b8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 May 2017 21:00:13 +1000 Subject: Update to Minecraft 1.12-pre5 --- nms-patches/PlayerInventory.patch | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'nms-patches/PlayerInventory.patch') diff --git a/nms-patches/PlayerInventory.patch b/nms-patches/PlayerInventory.patch index 0510e6ea..086019ab 100644 --- a/nms-patches/PlayerInventory.patch +++ b/nms-patches/PlayerInventory.patch @@ -16,9 +16,9 @@ public class PlayerInventory implements IInventory { public final NonNullList items; -@@ -16,11 +25,54 @@ +@@ -16,6 +25,49 @@ private ItemStack carried; - public boolean f; + private int h; + // CraftBukkit start - add fields and methods + public List transaction = new java.util.ArrayList(); @@ -26,7 +26,7 @@ + + public List getContents() { + List combined = new ArrayList(items.size() + armor.size() + extraSlots.size()); -+ for (List sub : this.g) { ++ for (List sub : this.f) { + combined.addAll(sub); + } + @@ -66,12 +66,6 @@ public PlayerInventory(EntityHuman entityhuman) { this.items = NonNullList.a(36, ItemStack.a); this.armor = NonNullList.a(4, ItemStack.a); - this.extraSlots = NonNullList.a(1, ItemStack.a); -- this.g = Arrays.asList(new NonNullList[] { this.items, this.armor, this.extraSlots}); -+ this.g = (List) Arrays.asList(new NonNullList[] { this.items, this.armor, this.extraSlots}); // CraftBukkit - decompile error - this.carried = ItemStack.a; - this.player = entityhuman; - } @@ -41,6 +93,23 @@ return itemstack.getItem() == itemstack1.getItem() && (!itemstack.usesData() || itemstack.getData() == itemstack1.getData()) && ItemStack.equals(itemstack, itemstack1); } -- cgit v1.2.3