diff options
author | md_5 <git@md-5.net> | 2016-03-01 20:07:44 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 20:07:44 +1100 |
commit | 5122dcd61e680d6587efcfc94917367d17a905f8 (patch) | |
tree | 0ba24025acf781a0e39a369dcbf5bae82b21e813 | |
parent | 69e196f79694328abc03f36f3543ba071e56c963 (diff) | |
download | craftbukkit-5122dcd61e680d6587efcfc94917367d17a905f8.tar craftbukkit-5122dcd61e680d6587efcfc94917367d17a905f8.tar.gz craftbukkit-5122dcd61e680d6587efcfc94917367d17a905f8.tar.lz craftbukkit-5122dcd61e680d6587efcfc94917367d17a905f8.tar.xz craftbukkit-5122dcd61e680d6587efcfc94917367d17a905f8.zip |
SPIGOT-1568: Fix jukeboxes
-rw-r--r-- | nms-patches/ItemStack.patch | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nms-patches/ItemStack.patch b/nms-patches/ItemStack.patch index 7750c2d3..fe0ae0c3 100644 --- a/nms-patches/ItemStack.patch +++ b/nms-patches/ItemStack.patch @@ -39,7 +39,7 @@ } -@@ -84,11 +101,128 @@ +@@ -84,11 +101,129 @@ } public EnumInteractionResult placeItem(EntityHuman entityhuman, World world, BlockPosition blockposition, EnumHand enumhand, EnumDirection enumdirection, float f, float f1, float f2) { @@ -136,11 +136,12 @@ + } + + // Special case juke boxes as they update their tile entity. Copied from ItemRecord. ++ // PAIL: checkme on updates. + if (this.getItem() instanceof ItemRecord) { + ((BlockJukeBox) Blocks.JUKEBOX).a(world, blockposition, world.getType(blockposition), this); -+ world.a((EntityHuman) null, 1005, blockposition, Item.getId(this.getItem())); ++ world.a((EntityHuman) null, 1010, blockposition, Item.getId(this.item)); + --this.count; -+ entityhuman.b(StatisticList.X); ++ entityhuman.b(StatisticList.Z); + } + + if (this.getItem() == Items.SKULL) { // Special case skulls to allow wither spawns to be cancelled @@ -169,7 +170,7 @@ return enuminteractionresult; } -@@ -112,7 +246,7 @@ +@@ -112,7 +247,7 @@ nbttagcompound.setByte("Count", (byte) this.count); nbttagcompound.setShort("Damage", (short) this.damage); if (this.tag != null) { @@ -178,7 +179,7 @@ } return nbttagcompound; -@@ -121,13 +255,18 @@ +@@ -121,13 +256,18 @@ public void c(NBTTagCompound nbttagcompound) { this.item = Item.d(nbttagcompound.getString("id")); this.count = nbttagcompound.getByte("Count"); @@ -198,7 +199,7 @@ if (this.item != null) { this.item.a(this.tag); } -@@ -164,6 +303,26 @@ +@@ -164,6 +304,26 @@ } public void setData(int i) { @@ -225,7 +226,7 @@ this.damage = i; if (this.damage < 0) { this.damage = 0; -@@ -216,6 +375,12 @@ +@@ -216,6 +376,12 @@ this.count = 0; } @@ -238,7 +239,7 @@ this.damage = 0; } -@@ -513,6 +678,7 @@ +@@ -513,6 +679,7 @@ public void setItem(Item item) { this.item = item; |