diff --git a/src/main/java/api/hbm/block/IFuckingExplode.java b/src/main/java/api/hbm/block/IFuckingExplode.java index 04e882128..95f128e20 100644 --- a/src/main/java/api/hbm/block/IFuckingExplode.java +++ b/src/main/java/api/hbm/block/IFuckingExplode.java @@ -5,7 +5,7 @@ import com.hbm.entity.item.EntityTNTPrimedBase; import net.minecraft.world.World; public interface IFuckingExplode { - + // Anything that can be detonated by another explosion should implement this and spawn an EntityTNTPrimedBase when hit by an explosion // This prevents chained explosions causing a stack overflow // Note that the block can still safely immediately explode, as long as the source isn't another explosion diff --git a/src/main/java/com/hbm/blocks/bomb/BlockChargeBase.java b/src/main/java/com/hbm/blocks/bomb/BlockChargeBase.java index 3405b9419..6419fe459 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockChargeBase.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockChargeBase.java @@ -141,7 +141,7 @@ public abstract class BlockChargeBase extends BlockContainerBase implements IBom if(!world.isRemote) { EntityTNTPrimedBase tntPrimed = new EntityTNTPrimedBase(world, x + 0.5D, y + 0.5D, z + 0.5D, explosion != null ? explosion.getExplosivePlacedBy() : null, this); tntPrimed.fuse = 0; - tntPrimed.detonateOnCollision = false; + tntPrimed.detonateOnCollision = false; world.spawnEntityInWorld(tntPrimed); } } diff --git a/src/main/java/com/hbm/blocks/bomb/BlockDetonatable.java b/src/main/java/com/hbm/blocks/bomb/BlockDetonatable.java index 9f9b00336..ceae92120 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockDetonatable.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockDetonatable.java @@ -11,15 +11,15 @@ import net.minecraft.world.World; public abstract class BlockDetonatable extends BlockFlammable implements IFuckingExplode { - protected int popFuse; // A shorter fuse for when this explosive is dinked by another - protected boolean detonateOnCollision; - protected boolean detonateOnShot; + protected int popFuse; // A shorter fuse for when this explosive is dinked by another + protected boolean detonateOnCollision; + protected boolean detonateOnShot; public BlockDetonatable(Material mat, int en, int flam, int popFuse, boolean detonateOnCollision, boolean detonateOnShot) { super(mat, en, flam); - this.popFuse = popFuse; - this.detonateOnCollision = detonateOnCollision; - this.detonateOnShot = detonateOnShot; + this.popFuse = popFuse; + this.detonateOnCollision = detonateOnCollision; + this.detonateOnShot = detonateOnShot; } @Override @@ -27,7 +27,7 @@ public abstract class BlockDetonatable extends BlockFlammable implements IFuckin if(!world.isRemote) { EntityTNTPrimedBase tntPrimed = new EntityTNTPrimedBase(world, x + 0.5D, y + 0.5D, z + 0.5D, explosion != null ? explosion.getExplosivePlacedBy() : null, this); tntPrimed.fuse = popFuse <= 0 ? 0 : world.rand.nextInt(popFuse) + popFuse / 2; - tntPrimed.detonateOnCollision = detonateOnCollision; + tntPrimed.detonateOnCollision = detonateOnCollision; world.spawnEntityInWorld(tntPrimed); } } @@ -45,11 +45,11 @@ public abstract class BlockDetonatable extends BlockFlammable implements IFuckin } } - public void onShot(World world, int x, int y, int z) { - if (!detonateOnShot) return; + public void onShot(World world, int x, int y, int z) { + if (!detonateOnShot) return; - world.setBlockToAir(x, y, z); - explodeEntity(world, x, y, z, null); // insta-explod - } + world.setBlockToAir(x, y, z); + explodeEntity(world, x, y, z, null); // insta-explod + } } diff --git a/src/main/java/com/hbm/blocks/bomb/DetMiner.java b/src/main/java/com/hbm/blocks/bomb/DetMiner.java index 8c5264c0f..f8b0ffcaa 100644 --- a/src/main/java/com/hbm/blocks/bomb/DetMiner.java +++ b/src/main/java/com/hbm/blocks/bomb/DetMiner.java @@ -51,7 +51,7 @@ public class DetMiner extends BlockPillar implements IBomb, IFuckingExplode { if(!world.isRemote) { EntityTNTPrimedBase tntPrimed = new EntityTNTPrimedBase(world, x + 0.5D, y + 0.5D, z + 0.5D, explosion != null ? explosion.getExplosivePlacedBy() : null, this); tntPrimed.fuse = 0; - tntPrimed.detonateOnCollision = false; + tntPrimed.detonateOnCollision = false; world.spawnEntityInWorld(tntPrimed); } } diff --git a/src/main/java/com/hbm/entity/projectile/EntityBullet.java b/src/main/java/com/hbm/entity/projectile/EntityBullet.java index 25d53ec6d..6924b0f3a 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBullet.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBullet.java @@ -856,20 +856,18 @@ public class EntityBullet extends Entity implements IProjectile { @Override @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float p_70070_1_) - { + public int getBrightnessForRender(float p_70070_1_) { if(this.getIsCritical() || this.getIsChopper()) return 15728880; else return super.getBrightnessForRender(p_70070_1_); - } + } - @Override - public float getBrightness(float p_70013_1_) - { + @Override + public float getBrightness(float p_70013_1_) { if(this.getIsCritical() || this.getIsChopper()) return 1.0F; else return super.getBrightness(p_70013_1_); - } + } } diff --git a/src/main/java/com/hbm/entity/projectile/EntityBulletBaseNT.java b/src/main/java/com/hbm/entity/projectile/EntityBulletBaseNT.java index f0507ad3d..2e44faf9f 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBulletBaseNT.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBulletBaseNT.java @@ -419,17 +419,17 @@ public class EntityBulletBaseNT extends EntityThrowableInterp implements IBullet if(config.emp > 3) { if (!this.worldObj.isRemote) { - EntityEMPBlast cloud = new EntityEMPBlast(this.worldObj, config.emp); - cloud.posX = this.posX; - cloud.posY = this.posY + 0.5F; - cloud.posZ = this.posZ; - + EntityEMPBlast cloud = new EntityEMPBlast(this.worldObj, config.emp); + cloud.posX = this.posX; + cloud.posY = this.posY + 0.5F; + cloud.posZ = this.posZ; + this.worldObj.spawnEntityInWorld(cloud); } } if(config.jolt > 0 && !worldObj.isRemote) - ExplosionLarge.jolt(worldObj, posX, posY, posZ, config.jolt, 150, 0.25); + ExplosionLarge.jolt(worldObj, posX, posY, posZ, config.jolt, 150, 0.25); if(config.explosive > 0 && !worldObj.isRemote) { //worldObj.newExplosion(this.thrower, posX, posY, posZ, config.explosive, config.incendiary > 0, config.blockDamage); @@ -448,7 +448,7 @@ public class EntityBulletBaseNT extends EntityThrowableInterp implements IBullet if(config.chlorine > 0 && !worldObj.isRemote) { ExplosionChaos.spawnChlorine(worldObj, posX, posY, posZ, config.chlorine, 1.5, 0); - worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "random.fizz", 5.0F, 2.6F + (rand.nextFloat() - rand.nextFloat()) * 0.8F); + worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "random.fizz", 5.0F, 2.6F + (rand.nextFloat() - rand.nextFloat()) * 0.8F); } if(config.rainbow > 0 && !worldObj.isRemote) { @@ -466,7 +466,7 @@ public class EntityBulletBaseNT extends EntityThrowableInterp implements IBullet } if(config.nuke > 0 && !worldObj.isRemote) { - worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, config.nuke, posX, posY, posZ)); + worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, config.nuke, posX, posY, posZ)); NBTTagCompound data = new NBTTagCompound(); data.setString("type", "muke"); if(MainRegistry.polaroidID == 11 || rand.nextInt(100) == 0) data.setBoolean("balefire", true); @@ -476,7 +476,7 @@ public class EntityBulletBaseNT extends EntityThrowableInterp implements IBullet if(config.destroysBlocks && !worldObj.isRemote) { if(block.getBlockHardness(worldObj, bX, bY, bZ) <= 120) - worldObj.func_147480_a(bX, bY, bZ, false); + worldObj.func_147480_a(bX, bY, bZ, false); } else if(config.doesBreakGlass && !worldObj.isRemote) { if(block == Blocks.glass || block == Blocks.glass_pane || block == Blocks.stained_glass || block == Blocks.stained_glass_pane) worldObj.func_147480_a(bX, bY, bZ, false);