summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockFluids.patch
diff options
context:
space:
mode:
authorBrokkonaut <hannos17@gmx.de>2016-12-09 12:53:15 +1100
committermd_5 <git@md-5.net>2016-12-09 12:53:15 +1100
commitf9eddf3f6eed4805d5c1dd5be4f4731be7e508c3 (patch)
tree89179bad83dc6514a0f19b2c816844089ca0d5bb /nms-patches/BlockFluids.patch
parentcaf86c88a91b7b87bb2ace9b28d4ecaa60120c92 (diff)
downloadcraftbukkit-f9eddf3f6eed4805d5c1dd5be4f4731be7e508c3.tar
craftbukkit-f9eddf3f6eed4805d5c1dd5be4f4731be7e508c3.tar.gz
craftbukkit-f9eddf3f6eed4805d5c1dd5be4f4731be7e508c3.tar.lz
craftbukkit-f9eddf3f6eed4805d5c1dd5be4f4731be7e508c3.tar.xz
craftbukkit-f9eddf3f6eed4805d5c1dd5be4f4731be7e508c3.zip
SPIGOT-2886: Call BlockFormEvent when Lava and Water collide
Diffstat (limited to 'nms-patches/BlockFluids.patch')
-rw-r--r--nms-patches/BlockFluids.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/nms-patches/BlockFluids.patch b/nms-patches/BlockFluids.patch
new file mode 100644
index 00000000..ba2f7bb4
--- /dev/null
+++ b/nms-patches/BlockFluids.patch
@@ -0,0 +1,27 @@
+--- a/net/minecraft/server/BlockFluids.java
++++ b/net/minecraft/server/BlockFluids.java
+@@ -163,14 +163,20 @@
+ Integer integer = (Integer) iblockdata.get(BlockFluids.LEVEL);
+
+ if (integer.intValue() == 0) {
+- world.setTypeUpdate(blockposition, Blocks.OBSIDIAN.getBlockData());
+- this.fizz(world, blockposition);
++ // CraftBukkit start
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.OBSIDIAN, null)) {
++ this.fizz(world, blockposition);
++ }
++ // CraftBukkit end
+ return true;
+ }
+
+ if (integer.intValue() <= 4) {
+- world.setTypeUpdate(blockposition, Blocks.COBBLESTONE.getBlockData());
+- this.fizz(world, blockposition);
++ // CraftBukkit start
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.COBBLESTONE, null)) {
++ this.fizz(world, blockposition);
++ }
++ // CraftBukkit end
+ return true;
+ }
+ }