diff options
Diffstat (limited to 'nms-patches/BlockFire.patch')
-rw-r--r-- | nms-patches/BlockFire.patch | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/nms-patches/BlockFire.patch b/nms-patches/BlockFire.patch index db1a8fdf..a8d60ca0 100644 --- a/nms-patches/BlockFire.patch +++ b/nms-patches/BlockFire.patch @@ -13,7 +13,7 @@ public class BlockFire extends Block { public static final BlockStateInteger AGE = BlockStateInteger.of("age", 0, 15); -@@ -109,7 +115,7 @@ +@@ -93,7 +99,7 @@ public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { if (world.getGameRules().getBoolean("doFireTick")) { if (!this.canPlace(world, blockposition)) { @@ -22,19 +22,19 @@ } Block block = world.getType(blockposition.down()).getBlock(); -@@ -120,7 +126,7 @@ - } +@@ -106,7 +112,7 @@ + int i = ((Integer) iblockdata.get(BlockFire.AGE)).intValue(); - if (!flag && world.S() && this.e(world, blockposition)) { + if (!flag && world.W() && this.b(world, blockposition) && random.nextFloat() < 0.2F + (float) i * 0.03F) { - world.setAir(blockposition); + fireExtinguished(world, blockposition); // CraftBukkit - extinguished by rain } else { - int i = ((Integer) iblockdata.get(BlockFire.AGE)).intValue(); - -@@ -133,14 +139,14 @@ + if (i < 15) { + iblockdata = iblockdata.set(BlockFire.AGE, Integer.valueOf(i + random.nextInt(3) / 2)); +@@ -117,14 +123,14 @@ if (!flag) { - if (!this.f(world, blockposition)) { - if (!World.a((IBlockAccess) world, blockposition.down()) || i > 3) { + if (!this.c(world, blockposition)) { + if (!world.getType(blockposition.down()).q() || i > 3) { - world.setAir(blockposition); + fireExtinguished(world, blockposition); // CraftBukkit } @@ -42,13 +42,13 @@ return; } - if (!this.e((IBlockAccess) world, blockposition.down()) && i == 15 && random.nextInt(4) == 0) { + if (!this.c((IBlockAccess) world, blockposition.down()) && i == 15 && random.nextInt(4) == 0) { - world.setAir(blockposition); + fireExtinguished(world, blockposition); // CraftBukkit return; } } -@@ -186,7 +192,26 @@ +@@ -170,7 +176,26 @@ l1 = 15; } @@ -76,7 +76,7 @@ } } } -@@ -224,6 +249,17 @@ +@@ -208,6 +233,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; -@@ -233,7 +269,7 @@ +@@ -217,7 +253,7 @@ world.setTypeAndData(blockposition, this.getBlockData().set(BlockFire.AGE, Integer.valueOf(l)), 3); } else { @@ -103,27 +103,27 @@ } if (iblockdata.getBlock() == Blocks.TNT) { -@@ -290,7 +326,7 @@ +@@ -274,7 +310,7 @@ public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) { - if (!World.a((IBlockAccess) world, blockposition.down()) && !this.f(world, blockposition)) { + if (!world.getType(blockposition.down()).q() && !this.c(world, blockposition)) { - world.setAir(blockposition); + fireExtinguished(world, blockposition); // CraftBukkit - fuel block gone } } -@@ -298,7 +334,7 @@ +@@ -282,7 +318,7 @@ public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) { - if (world.worldProvider.getDimension() > 0 || !Blocks.PORTAL.e(world, blockposition)) { - if (!World.a((IBlockAccess) world, blockposition.down()) && !this.f(world, blockposition)) { + if (world.worldProvider.getDimensionManager().getDimensionID() > 0 || !Blocks.PORTAL.b(world, blockposition)) { + if (!world.getType(blockposition.down()).q() && !this.c(world, blockposition)) { - world.setAir(blockposition); + fireExtinguished(world, blockposition); // CraftBukkit - fuel block broke } else { world.a(blockposition, (Block) this, this.a(world) + world.random.nextInt(10)); } -@@ -320,4 +356,12 @@ +@@ -304,4 +340,12 @@ protected BlockStateList getStateList() { - return new BlockStateList(this, new IBlockState[] { BlockFire.AGE, BlockFire.NORTH, BlockFire.EAST, BlockFire.SOUTH, BlockFire.WEST, BlockFire.UPPER, BlockFire.FLIP, BlockFire.ALT}); + return new BlockStateList(this, new IBlockState[] { BlockFire.AGE, BlockFire.NORTH, BlockFire.EAST, BlockFire.SOUTH, BlockFire.WEST, BlockFire.UPPER}); } + + // CraftBukkit start |