diff options
author | md_5 <git@md-5.net> | 2016-05-10 21:47:39 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-05-10 21:47:39 +1000 |
commit | c5e9a169fa564f3b8119b6666f8df59d5a9b45c3 (patch) | |
tree | 9f3b1ce732f0082b71512b1dddb7abb35526226e /nms-patches/BlockFire.patch | |
parent | 4cb32587ac1ff543b2efa9498f8d0d358cb90c12 (diff) | |
download | craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.gz craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.lz craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.xz craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.zip |
Minecraft 1.9.4
Diffstat (limited to 'nms-patches/BlockFire.patch')
-rw-r--r-- | nms-patches/BlockFire.patch | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nms-patches/BlockFire.patch b/nms-patches/BlockFire.patch index a8d60ca0..2e7ea0a4 100644 --- a/nms-patches/BlockFire.patch +++ b/nms-patches/BlockFire.patch @@ -1,8 +1,8 @@ --- a/net/minecraft/server/BlockFire.java +++ b/net/minecraft/server/BlockFire.java -@@ -4,6 +4,12 @@ - import java.util.Map; +@@ -5,6 +5,12 @@ import java.util.Random; + import javax.annotation.Nullable; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -13,7 +13,7 @@ public class BlockFire extends Block { public static final BlockStateInteger AGE = BlockStateInteger.of("age", 0, 15); -@@ -93,7 +99,7 @@ +@@ -95,7 +101,7 @@ public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { if (world.getGameRules().getBoolean("doFireTick")) { if (!this.canPlace(world, blockposition)) { @@ -22,7 +22,7 @@ } Block block = world.getType(blockposition.down()).getBlock(); -@@ -106,7 +112,7 @@ +@@ -108,7 +114,7 @@ int i = ((Integer) iblockdata.get(BlockFire.AGE)).intValue(); if (!flag && world.W() && this.b(world, blockposition) && random.nextFloat() < 0.2F + (float) i * 0.03F) { @@ -31,7 +31,7 @@ } else { if (i < 15) { iblockdata = iblockdata.set(BlockFire.AGE, Integer.valueOf(i + random.nextInt(3) / 2)); -@@ -117,14 +123,14 @@ +@@ -119,14 +125,14 @@ if (!flag) { if (!this.c(world, blockposition)) { if (!world.getType(blockposition.down()).q() || i > 3) { @@ -48,7 +48,7 @@ return; } } -@@ -170,7 +176,26 @@ +@@ -172,7 +178,26 @@ l1 = 15; } @@ -76,7 +76,7 @@ } } } -@@ -208,6 +233,17 @@ +@@ -210,6 +235,17 @@ if (random.nextInt(i) < k) { IBlockData iblockdata = world.getType(blockposition); @@ -94,7 +94,7 @@ if (random.nextInt(j + 10) < 5 && !world.isRainingAt(blockposition)) { int l = j + random.nextInt(5) / 4; -@@ -217,7 +253,7 @@ +@@ -219,7 +255,7 @@ world.setTypeAndData(blockposition, this.getBlockData().set(BlockFire.AGE, Integer.valueOf(l)), 3); } else { @@ -103,16 +103,16 @@ } if (iblockdata.getBlock() == Blocks.TNT) { -@@ -274,7 +310,7 @@ +@@ -276,7 +312,7 @@ - public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) { + public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Block block) { if (!world.getType(blockposition.down()).q() && !this.c(world, blockposition)) { - world.setAir(blockposition); + fireExtinguished(world, blockposition); // CraftBukkit - fuel block gone } } -@@ -282,7 +318,7 @@ +@@ -284,7 +320,7 @@ public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { if (world.worldProvider.getDimensionManager().getDimensionID() > 0 || !Blocks.PORTAL.b(world, blockposition)) { if (!world.getType(blockposition.down()).q() && !this.c(world, blockposition)) { @@ -121,7 +121,7 @@ } else { world.a(blockposition, (Block) this, this.a(world) + world.random.nextInt(10)); } -@@ -304,4 +340,12 @@ +@@ -306,4 +342,12 @@ protected BlockStateList getStateList() { return new BlockStateList(this, new IBlockState[] { BlockFire.AGE, BlockFire.NORTH, BlockFire.EAST, BlockFire.SOUTH, BlockFire.WEST, BlockFire.UPPER}); } |