@@ -67,8 +67,8 @@
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public PlayerInventory(EntityHuman entityhuman) {
|
||||
this.items = NonNullList.a(36, ItemStack.a);
|
||||
this.armor = NonNullList.a(4, ItemStack.a);
|
||||
this.items = NonNullList.a(36, ItemStack.b);
|
||||
this.armor = NonNullList.a(4, ItemStack.b);
|
||||
@@ -41,6 +96,28 @@
|
||||
return itemstack.getItem() == itemstack1.getItem() && ItemStack.equals(itemstack, itemstack1);
|
||||
}
|
||||
@@ -98,10 +98,10 @@
|
||||
public int getFirstEmptySlotIndex() {
|
||||
for (int i = 0; i < this.items.size(); ++i) {
|
||||
if (((ItemStack) this.items.get(i)).isEmpty()) {
|
||||
@@ -513,8 +590,9 @@
|
||||
@@ -480,8 +557,9 @@
|
||||
ItemStack itemstack = (ItemStack) this.armor.get(i);
|
||||
|
||||
if (itemstack.getItem() instanceof ItemArmor) {
|
||||
if ((!damagesource.isFire() || !itemstack.getItem().u()) && itemstack.getItem() instanceof ItemArmor) {
|
||||
+ int finalI = i; // CraftBukkit - decompile error
|
||||
itemstack.damage((int) f, this.player, (entityhuman) -> {
|
||||
- entityhuman.broadcastItemBreak(EnumItemSlot.a(EnumItemSlot.Function.ARMOR, i));
|
||||
@@ -109,13 +109,13 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -550,6 +628,11 @@
|
||||
@@ -517,6 +595,11 @@
|
||||
}
|
||||
|
||||
public ItemStack getCarried() {
|
||||
+ // CraftBukkit start
|
||||
+ if (this.carried.isEmpty()) {
|
||||
+ this.setCarried(ItemStack.a);
|
||||
+ this.setCarried(ItemStack.b);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
return this.carried;
|
||||
|
||||
Reference in New Issue
Block a user