summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockConcretePowder.patch
diff options
context:
space:
mode:
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;