diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-07-08 22:50:32 +0100 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-07-08 22:50:32 +0100 |
commit | 7742e12aff5c1dc8f9b64513b467c5b65e6ffcbc (patch) | |
tree | ed9c798896e6e517b16a09e139e1caf76adf2e57 /nms-patches | |
parent | e3b5669be1142f4ad4f8d0c9b850d058ae6a026d (diff) | |
download | craftbukkit-7742e12aff5c1dc8f9b64513b467c5b65e6ffcbc.tar craftbukkit-7742e12aff5c1dc8f9b64513b467c5b65e6ffcbc.tar.gz craftbukkit-7742e12aff5c1dc8f9b64513b467c5b65e6ffcbc.tar.lz craftbukkit-7742e12aff5c1dc8f9b64513b467c5b65e6ffcbc.tar.xz craftbukkit-7742e12aff5c1dc8f9b64513b467c5b65e6ffcbc.zip |
SPIGOT-1018: Fix isFromBonemeal always being false
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/ItemStack.patch | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/nms-patches/ItemStack.patch b/nms-patches/ItemStack.patch index 2050be38..9a2c9a54 100644 --- a/nms-patches/ItemStack.patch +++ b/nms-patches/ItemStack.patch @@ -39,7 +39,7 @@ } -@@ -83,11 +100,127 @@ +@@ -83,11 +100,128 @@ } public boolean placeItem(EntityHuman entityhuman, World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2) { @@ -72,7 +72,8 @@ + world.capturedBlockStates.clear(); + StructureGrowEvent event = null; + if (treeType != null) { -+ event = new StructureGrowEvent(location, treeType, false, (Player) entityhuman.getBukkitEntity(), blocks); ++ boolean isBonemeal = getItem() == Items.DYE && data == 15; ++ event = new StructureGrowEvent(location, treeType, isBonemeal, (Player) entityhuman.getBukkitEntity(), blocks); + org.bukkit.Bukkit.getPluginManager().callEvent(event); + } + if (event == null || !event.isCancelled()) { @@ -168,7 +169,7 @@ return flag; } -@@ -111,7 +244,7 @@ +@@ -111,7 +245,7 @@ nbttagcompound.setByte("Count", (byte) this.count); nbttagcompound.setShort("Damage", (short) this.damage); if (this.tag != null) { @@ -177,7 +178,7 @@ } return nbttagcompound; -@@ -125,13 +258,18 @@ +@@ -125,13 +259,18 @@ } this.count = nbttagcompound.getByte("Count"); @@ -197,7 +198,7 @@ if (this.item != null) { this.item.a(this.tag); } -@@ -168,8 +306,28 @@ +@@ -168,8 +307,28 @@ } public void setData(int i) { @@ -227,7 +228,7 @@ this.damage = 0; } -@@ -223,6 +381,12 @@ +@@ -223,6 +382,12 @@ this.count = 0; } @@ -240,7 +241,7 @@ this.damage = 0; } -@@ -489,6 +653,7 @@ +@@ -489,6 +654,7 @@ public void setItem(Item item) { this.item = item; |