mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 13:42:25 -07:00
Update to Minecraft 1.11
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user