summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemStack.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ItemStack.patch')
-rw-r--r--nms-patches/ItemStack.patch24
1 files changed, 16 insertions, 8 deletions
diff --git a/nms-patches/ItemStack.patch b/nms-patches/ItemStack.patch
index 79bdd15a..a869e407 100644
--- a/nms-patches/ItemStack.patch
+++ b/nms-patches/ItemStack.patch
@@ -1,5 +1,5 @@
---- /home/matt/mc-dev-private//net/minecraft/server/ItemStack.java 2015-03-16 09:47:03.755222168 +0000
-+++ src/main/java/net/minecraft/server/ItemStack.java 2015-03-16 09:47:03.759222168 +0000
+--- ../work/decompile-73f3c166/net/minecraft/server/ItemStack.java 2015-04-10 21:23:03.678603362 +1000
++++ src/main/java/net/minecraft/server/ItemStack.java 2015-04-10 21:23:03.682603388 +1000
@@ -5,6 +5,19 @@
import java.text.DecimalFormat;
import java.util.Random;
@@ -39,7 +39,7 @@
}
-@@ -83,11 +100,119 @@
+@@ -83,11 +100,127 @@
}
public boolean placeItem(EntityHuman entityhuman, World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2) {
@@ -134,6 +134,14 @@
+ world.setTileEntity(e.getKey(), e.getValue());
+ }
+
++ // Special case juke boxes as they update their tile entity. Copied from ItemRecord.
++ 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()));
++ --this.count;
++ entityhuman.b(StatisticList.X);
++ }
++
+ if (this.getItem() == Items.SKULL) { // Special case skulls to allow wither spawns to be cancelled
+ BlockPosition bp = blockposition;
+ if (!world.getType(blockposition).getBlock().a(world, blockposition)) {
@@ -160,7 +168,7 @@
return flag;
}
-@@ -111,7 +236,7 @@
+@@ -111,7 +244,7 @@
nbttagcompound.setByte("Count", (byte) this.count);
nbttagcompound.setShort("Damage", (short) this.damage);
if (this.tag != null) {
@@ -169,7 +177,7 @@
}
return nbttagcompound;
-@@ -125,13 +250,18 @@
+@@ -125,13 +258,18 @@
}
this.count = nbttagcompound.getByte("Count");
@@ -189,7 +197,7 @@
if (this.item != null) {
this.item.a(this.tag);
}
-@@ -168,8 +298,28 @@
+@@ -168,8 +306,28 @@
}
public void setData(int i) {
@@ -219,7 +227,7 @@
this.damage = 0;
}
-@@ -223,6 +373,12 @@
+@@ -223,6 +381,12 @@
this.count = 0;
}
@@ -232,7 +240,7 @@
this.damage = 0;
}
-@@ -489,6 +645,7 @@
+@@ -489,6 +653,7 @@
public void setItem(Item item) {
this.item = item;