diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-04-30 16:42:29 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-04-30 16:42:29 +1000 |
commit | 13155dc73e27b92fb0f091e0fb133b07a35248eb (patch) | |
tree | 7009e433b3ce3c3c9dfbe54606763756c52e63db /src/Java | |
parent | e324097dd83a225fe7e0777b2abd454b25c6be02 (diff) | |
download | GT5-Unofficial-13155dc73e27b92fb0f091e0fb133b07a35248eb.tar.gz GT5-Unofficial-13155dc73e27b92fb0f091e0fb133b07a35248eb.tar.bz2 GT5-Unofficial-13155dc73e27b92fb0f091e0fb133b07a35248eb.zip |
+ Made Hellfire burn Grass and Mycelium.
Diffstat (limited to 'src/Java')
-rw-r--r-- | src/Java/gtPlusPlus/core/block/general/HellFire.java | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/src/Java/gtPlusPlus/core/block/general/HellFire.java b/src/Java/gtPlusPlus/core/block/general/HellFire.java index 89582c1824..240da54e48 100644 --- a/src/Java/gtPlusPlus/core/block/general/HellFire.java +++ b/src/Java/gtPlusPlus/core/block/general/HellFire.java @@ -49,17 +49,24 @@ public class HellFire extends BlockFire { private void enableBrutalFire() { for (Object o : Block.blockRegistry.getKeys()) - { - String name = (String)o; - Block b = Block.getBlockFromName(name); - if (b != Blocks.air) - { - int spread = Blocks.fire.getEncouragement(b); - int flamm = Blocks.fire.getFlammability(b); - this.setFireInfo(b, spread * 4, flamm * 4); - } - } - + { + String name = (String)o; + Block b = Block.getBlockFromName(name); + + if (b == Blocks.grass || b == Blocks.mycelium){ + int spread = 3; + int flamm = 3; + this.setFireInfo(b, spread * 4, flamm * 4); + } + + if (b != Blocks.air) + { + int spread = Blocks.fire.getEncouragement(b); + int flamm = Blocks.fire.getFlammability(b); + this.setFireInfo(b, spread * 4, flamm * 4); + } + } + } /** @@ -75,7 +82,7 @@ public class HellFire extends BlockFire { */ @Override public void updateTick(final World world, final int x, final int y, final int z, Random random) { - + random = new XSTR(); if (world.getGameRules().getGameRuleBooleanValue("doFireTick")) { @@ -89,7 +96,7 @@ public class HellFire extends BlockFire { && (world.canLightningStrikeAt(x, y, z) || world.canLightningStrikeAt(x - 1, y, z) || world.canLightningStrikeAt(x + 1, y, z) || world.canLightningStrikeAt(x, y, z - 1) || world.canLightningStrikeAt(x, y, z + 1))) { - + if (MathUtils.randInt(0, 100) >= 90){ world.setBlockToAir(x, y, z); } @@ -280,13 +287,13 @@ public class HellFire extends BlockFire { } } } - + //Burn @Override public void onEntityWalking(World world, int i, int j, int k, Entity entity) { entity.setFire(10); } - + //Burn @Override public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity) { @@ -300,9 +307,9 @@ public class HellFire extends BlockFire { @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(final World world, final int x, final int y, final int z, Random randomObj) { - + randomObj = new XSTR(); - + if (randomObj.nextInt(24) == 0) { world.playSound(x + 0.5F, y + 0.5F, z + 0.5F, "fire.fire", 1.0F + randomObj.nextFloat(), (randomObj.nextFloat() * 0.7F) + 0.3F, false); @@ -323,7 +330,7 @@ public class HellFire extends BlockFire { world.spawnParticle("witchMagic", f, f1, f2, 0.0D, 0.0D, 0.0D); world.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); world.spawnParticle("largesmoke", f, f1+0.5F, f2, 0.0D, 0.0D, 0.0D); - + } } |