summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockConcretePowder.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-06-03 17:39:03 +1000
committermd_5 <git@md-5.net>2017-06-03 17:39:03 +1000
commit701b06494ddf4a807788f159fe5aa7e63dff7a42 (patch)
tree8600577d8bd0d3c96034f8c6846e6579f1c81e0d /nms-patches/BlockConcretePowder.patch
parent921ba53556066ee16cb212e564ee9403fb6a73ff (diff)
downloadcraftbukkit-701b06494ddf4a807788f159fe5aa7e63dff7a42.tar
craftbukkit-701b06494ddf4a807788f159fe5aa7e63dff7a42.tar.gz
craftbukkit-701b06494ddf4a807788f159fe5aa7e63dff7a42.tar.lz
craftbukkit-701b06494ddf4a807788f159fe5aa7e63dff7a42.tar.xz
craftbukkit-701b06494ddf4a807788f159fe5aa7e63dff7a42.zip
SPIGOT-3286: Call BlockFormEvent for Concrete Powder -> Concrete
Diffstat (limited to 'nms-patches/BlockConcretePowder.patch')
-rw-r--r--nms-patches/BlockConcretePowder.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/nms-patches/BlockConcretePowder.patch b/nms-patches/BlockConcretePowder.patch
new file mode 100644
index 00000000..dd2708f7
--- /dev/null
+++ b/nms-patches/BlockConcretePowder.patch
@@ -0,0 +1,22 @@
+--- a/net/minecraft/server/BlockConcretePowder.java
++++ b/net/minecraft/server/BlockConcretePowder.java
+@@ -11,8 +11,8 @@
+ }
+
+ public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {
+- if (iblockdata1.getMaterial().isLiquid()) {
+- world.setTypeAndData(blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), 3);
++ if (iblockdata1.getMaterial().isLiquid() && world.getType(blockposition).getBlock() != Blocks.dR) { // CraftBukkit - don't double concrete
++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), null); // CraftBukkit
+ }
+
+ }
+@@ -36,7 +36,7 @@
+ }
+
+ if (flag) {
+- world.setTypeAndData(blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), 3);
++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), null); // CraftBukkit
+ }
+
+ return flag;