Update to Minecraft 1.11

This commit is contained in:
md_5
2016-11-17 12:41:03 +11:00
parent 51263e9718
commit c25ddf063a
279 changed files with 3722 additions and 2992 deletions

View File

@@ -30,21 +30,21 @@
@@ -232,7 +234,7 @@
}
public PacketDataSerializer a(@Nullable ItemStack itemstack) {
- if (itemstack == null) {
+ if (itemstack == null || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem()
public PacketDataSerializer a(ItemStack itemstack) {
- if (itemstack.isEmpty()) {
+ if (itemstack.isEmpty() || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem()
this.writeShort(-1);
} else {
this.writeShort(Item.getId(itemstack.getItem()));
@@ -261,6 +263,11 @@
ItemStack itemstack = new ItemStack(Item.getById(short0), b0, short1);
itemstack = new ItemStack(Item.getById(short0), b0, short1);
itemstack.setTag(this.j());
+ // CraftBukkit start
+ if (itemstack.getTag() != null) {
+ CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack));
+ }
+ // CraftBukkit end
return itemstack;
}
return itemstack;
}