SPIGOT-2886: Call BlockFormEvent when Lava and Water collide

By: Brokkonaut <hannos17@gmx.de>
This commit is contained in:
CraftBukkit/Spigot
2016-12-09 12:53:15 +11:00
parent 9e8988306c
commit 2fa7ac3174
2 changed files with 36 additions and 4 deletions

View File

@@ -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;
}
}