Update to Minecraft 1.16.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-06-25 10:00:00 +10:00
parent 3862d2811e
commit 50503fd516
424 changed files with 5960 additions and 5636 deletions

View File

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