Update to Minecraft 1.12-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-05-19 21:00:13 +10:00
parent 5284eb89a3
commit 530fe41851
47 changed files with 222 additions and 283 deletions

View File

@@ -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);
}