Fix indentation, ensuring all tabs

This commit is contained in:
George Paton 2024-05-09 11:17:44 +10:00
parent 1c9c7f47fb
commit 3a5a35a92a
6 changed files with 29 additions and 31 deletions

View File

@ -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

View File

@ -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);
}
}

View File

@ -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
}
}

View File

@ -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);
}
}

View File

@ -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_);
}
}
}

View File

@ -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);