summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2015-02-03 17:46:30 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2015-02-03 17:46:30 +0000
commit2f50138ba3e39132f5f004abf0fa5b085f0886e7 (patch)
tree06f2d138dbbadaa3aff08e63291a9983414bc2ec
parent21736308468155508e57ef7453a3927043c7ba57 (diff)
downloadcraftbukkit-2f50138ba3e39132f5f004abf0fa5b085f0886e7.tar
craftbukkit-2f50138ba3e39132f5f004abf0fa5b085f0886e7.tar.gz
craftbukkit-2f50138ba3e39132f5f004abf0fa5b085f0886e7.tar.lz
craftbukkit-2f50138ba3e39132f5f004abf0fa5b085f0886e7.tar.xz
craftbukkit-2f50138ba3e39132f5f004abf0fa5b085f0886e7.zip
Fix BlockIgniteEvent and BlockSpreadEvent being called with the wrong locations
in some cases
-rw-r--r--nms-patches/BlockFire.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/nms-patches/BlockFire.patch b/nms-patches/BlockFire.patch
index 2210d863..483fa372 100644
--- a/nms-patches/BlockFire.patch
+++ b/nms-patches/BlockFire.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/BlockFire.java 2014-11-28 17:43:42.901707439 +0000
-+++ src/main/java/net/minecraft/server/BlockFire.java 2014-11-28 17:38:22.000000000 +0000
+--- ../work/decompile-8eb82bde//net/minecraft/server/BlockFire.java 2015-02-03 17:46:01.250916418 +0000
++++ src/main/java/net/minecraft/server/BlockFire.java 2015-02-03 17:46:01.250916418 +0000
@@ -4,6 +4,12 @@
import java.util.Map;
import java.util.Random;
@@ -38,17 +38,17 @@
- world.setTypeAndData(blockposition1, iblockdata.set(BlockFire.AGE, Integer.valueOf(l1)), 3);
+ // CraftBukkit start - Call to stop spread of fire
+ if (world.getType(blockposition1) != Blocks.FIRE) {
-+ if (CraftEventFactory.callBlockIgniteEvent(world, i1, k1, j1, i, j, k).isCancelled()) {
++ if (CraftEventFactory.callBlockIgniteEvent(world, blockposition1.getX(), blockposition1.getY(), blockposition1.getZ(), blockposition.getX(), blockposition.getY(), blockposition.getZ()).isCancelled()) {
+ continue;
+ }
+
+ org.bukkit.Server server = world.getServer();
+ org.bukkit.World bworld = world.getWorld();
-+ org.bukkit.block.BlockState blockState = bworld.getBlockAt(i1, k1, j1).getState();
++ org.bukkit.block.BlockState blockState = bworld.getBlockAt(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ()).getState();
+ blockState.setTypeId(Block.getId(this));
+ blockState.setData(new org.bukkit.material.MaterialData(Block.getId(this), (byte) l1));
+
-+ BlockSpreadEvent spreadEvent = new BlockSpreadEvent(blockState.getBlock(), bworld.getBlockAt(i, j, k), blockState);
++ BlockSpreadEvent spreadEvent = new BlockSpreadEvent(blockState.getBlock(), bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), blockState);
+ server.getPluginManager().callEvent(spreadEvent);
+
+ if (!spreadEvent.isCancelled()) {