2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/BlockStationary.java
|
|
|
|
+++ b/net/minecraft/server/BlockStationary.java
|
2014-11-25 22:32:16 +01:00
|
|
|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
|
|
+
|
|
|
|
public class BlockStationary extends BlockFluids {
|
|
|
|
|
|
|
|
protected BlockStationary(Material material) {
|
2016-02-29 22:32:46 +01:00
|
|
|
@@ -45,6 +47,13 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
if (block.material == Material.AIR) {
|
2016-02-29 22:32:46 +01:00
|
|
|
if (this.c(world, blockposition1)) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start - Prevent lava putting something on fire
|
|
|
|
+ if (world.getType(blockposition1) != Blocks.FIRE) {
|
|
|
|
+ if (CraftEventFactory.callBlockIgniteEvent(world, blockposition1.getX(), blockposition1.getY(), blockposition1.getZ(), blockposition.getX(), blockposition.getY(), blockposition.getZ()).isCancelled()) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
world.setTypeUpdate(blockposition1, Blocks.FIRE.getBlockData());
|
|
|
|
return;
|
|
|
|
}
|
2016-05-10 13:47:39 +02:00
|
|
|
@@ -61,6 +70,14 @@
|
2016-02-29 22:32:46 +01:00
|
|
|
}
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2016-02-29 22:32:46 +01:00
|
|
|
if (world.isEmpty(blockposition2.up()) && this.d(world, blockposition2)) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start - Prevent lava putting something on fire
|
|
|
|
+ BlockPosition up = blockposition2.up();
|
|
|
|
+ if (world.getType(up) != Blocks.FIRE) {
|
|
|
|
+ if (CraftEventFactory.callBlockIgniteEvent(world, up.getX(), up.getY(), up.getZ(), blockposition.getX(), blockposition.getY(), blockposition.getZ()).isCancelled()) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
world.setTypeUpdate(blockposition2.up(), Blocks.FIRE.getBlockData());
|
|
|
|
}
|
|
|
|
}
|