diff options
Diffstat (limited to 'nms-patches/PlayerInventory.patch')
-rw-r--r-- | nms-patches/PlayerInventory.patch | 12 |
1 files changed, 3 insertions, 9 deletions
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<ItemStack> 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<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>(); @@ -26,7 +26,7 @@ + + public List<ItemStack> getContents() { + List<ItemStack> combined = new ArrayList<ItemStack>(items.size() + armor.size() + extraSlots.size()); -+ for (List<net.minecraft.server.ItemStack> sub : this.g) { ++ for (List<net.minecraft.server.ItemStack> 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); } |