Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/server/PlayerInventory.java
+++ b/net/minecraft/server/PlayerInventory.java
@@ -6,6 +6,15 @@
@@ -5,6 +5,15 @@
import java.util.List;
import java.util.function.Predicate;
import javax.annotation.Nullable;
+// CraftBukkit start
+import java.util.ArrayList;
@@ -13,10 +13,10 @@
+import org.bukkit.entity.HumanEntity;
+// CraftBukkit end
+
public class PlayerInventory implements IInventory {
public class PlayerInventory implements IInventory, INamableTileEntity {
public final NonNullList<ItemStack> items;
@@ -17,6 +26,49 @@
@@ -16,6 +25,54 @@
private ItemStack carried;
private int h;
@@ -53,6 +53,11 @@
+ return this.player.getBukkitEntity();
+ }
+
+ @Override
+ public int getMaxStackSize() {
+ return maxStack;
+ }
+
+ public void setMaxStackSize(int size) {
+ maxStack = size;
+ }
@@ -66,7 +71,7 @@
public PlayerInventory(EntityHuman entityhuman) {
this.items = NonNullList.a(36, ItemStack.a);
this.armor = NonNullList.a(4, ItemStack.a);
@@ -42,6 +94,22 @@
@@ -41,6 +98,22 @@
return itemstack.getItem() == itemstack1.getItem() && ItemStack.equals(itemstack, itemstack1);
}
@@ -89,16 +94,18 @@
public int getFirstEmptySlotIndex() {
for (int i = 0; i < this.items.size(); ++i) {
if (((ItemStack) this.items.get(i)).isEmpty()) {
@@ -502,7 +570,7 @@
}
@@ -513,8 +586,9 @@
ItemStack itemstack = (ItemStack) this.armor.get(i);
public int getMaxStackSize() {
- return 64;
+ return maxStack; // CraftBukkit
}
public boolean b(IBlockData iblockdata) {
@@ -554,6 +622,11 @@
if (itemstack.getItem() instanceof ItemArmor) {
+ int finalI = i; // CraftBukkit - decompile error
itemstack.damage((int) f, this.player, (entityhuman) -> {
- entityhuman.c(EnumItemSlot.a(EnumItemSlot.Function.ARMOR, i));
+ entityhuman.c(EnumItemSlot.a(EnumItemSlot.Function.ARMOR, finalI)); // CraftBukkit - decompile error
});
}
}
@@ -550,6 +624,11 @@
}
public ItemStack getCarried() {