quick fix : Redundant type cast

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent b34eec4dea
commit 2d13e6185e
84 files changed
+426 -434

No files matched your search

@@ -38,7 +38,7 @@ public class SlimeGel extends TConstructBlock {
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
if (entity.motionY < 0) {
if (entity.motionY < -0.08F) {
Block var9 = (Block) this;
Block var9 = this;
world.playSoundEffect(
x + 0.5F,
y + 0.5F,
@@ -100,12 +100,12 @@ public class SlimeGrass extends MantleBlock {
&& blockAbove != this) {
Block block = world.getBlock(posX, posY, posZ);
if (block == Blocks.dirt) {
world.setBlock(posX, posY, posZ, (Block) this, 1, 3);
world.setBlock(posX, posY, posZ, this, 1, 3);
return;
}
int blockMeta = world.getBlockMetadata(posX, posY, posZ);
if (block == TinkerTools.craftedSoil) {
if (blockMeta == 5) world.setBlock(posX, posY, posZ, (Block) this, 0, 3);
if (blockMeta == 5) world.setBlock(posX, posY, posZ, this, 0, 3);
}
}
}
@@ -155,26 +155,26 @@ public class Landmine extends MantleBlock {
if (this.triggerMobType == EnumCreatureType.creature) {
var8 = world.getEntitiesWithinAABBExcludingEntity(
(Entity) null,
null,
AxisAlignedBB.getBoundingBox(
(double) ((float) posX + var7),
(double) posY,
(double) ((float) posZ + var7),
(double) ((float) (posX + 1) - var7),
(float) posX + var7,
posY,
(float) posZ + var7,
(float) (posX + 1) - var7,
(double) posY + 0.25D,
(double) ((float) (posZ + 1) - var7)));
(float) (posZ + 1) - var7));
}
if (this.triggerMobType == EnumCreatureType.monster) {
var8 = world.getEntitiesWithinAABB(
EntityLiving.class,
AxisAlignedBB.getBoundingBox(
(double) ((float) posX + var7),
(double) posY,
(double) ((float) posZ + var7),
(double) ((float) (posX + 1) - var7),
(float) posX + var7,
posY,
(float) posZ + var7,
(float) (posX + 1) - var7,
(double) posY + 0.25D,
(double) ((float) (posZ + 1) - var7)));
(float) (posZ + 1) - var7));
}
/*
@@ -197,7 +197,7 @@ public class Landmine extends MantleBlock {
if (var6 && !var5) {
WorldHelper.setBlockToAir(world, posX, posY, posZ);
world.createExplosion((Entity) null, posX, posY, posZ, 2.0F, true);
world.createExplosion(null, posX, posY, posZ, 2.0F, true);
/*
* par1World.setBlockMetadataWithNotify(posX, posY, posZ, 1);
* par1World.notifyBlocksOfNeighborChange(posX, posY, posZ,
@@ -50,9 +50,9 @@ public class Punji extends MantleBlock {
if (stack != null && stack.getItem() == Item.getItemFromBlock(TinkerWorld.punji)) {
world.setBlockMetadataWithNotify(x, y, z, meta + 1, 3);
world.playSoundEffect(
(double) ((float) x + 0.5F),
(double) ((float) y + 0.5F),
(double) ((float) z + 0.5F),
(float) x + 0.5F,
(float) y + 0.5F,
(float) z + 0.5F,
this.stepSound.soundName,
(this.stepSound.getVolume() + 1.0F) / 2.0F,
this.stepSound.getPitch() * 0.8F);