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

@@ -21,7 +21,7 @@ final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem {
int j = par1IBlockSource.getYInt() + enumfacing.getFrontOffsetY();
int k = par1IBlockSource.getZInt() + enumfacing.getFrontOffsetZ();
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(
(double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1));
i, j, k, i + 1, j + 1, k + 1);
List list = par1IBlockSource
.getWorld()
.selectEntitiesWithinAABB(
@@ -135,7 +135,7 @@ public class MultiFluidTank extends LogicComponent implements IFluidTank {
fluidlist.clear();
for (int iter = 0; iter < liquidTag.tagCount(); iter++) {
NBTTagCompound nbt = (NBTTagCompound) liquidTag.getCompoundTagAt(iter);
NBTTagCompound nbt = liquidTag.getCompoundTagAt(iter);
FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt);
if (fluid != null) fluidlist.add(fluid);
}
@@ -70,7 +70,7 @@ public class Detailing {
public DetailInput getDetailing(Block block, int inputMeta) {
for (int i = 0; i < detailing.size(); i++) {
DetailInput detail = (DetailInput) detailing.get(i);
DetailInput detail = detailing.get(i);
if (Item.getItemFromBlock(block) == detail.input.getItem() && inputMeta == detail.inputMeta) {
return detail;
}
@@ -55,7 +55,7 @@ public class PatternBuilder {
ItemKey key = getItemKey(material);
if (key != null) {
MaterialSet mat = (MaterialSet) materialSets.get(key.key);
MaterialSet mat = materialSets.get(key.key);
ItemStack toolPart = getMatchingPattern(pattern, material, mat);
if (toolPart != null) {
@@ -99,7 +99,7 @@ public class PatternBuilder {
if (material != null) {
ItemKey key = getItemKey(material);
if (key != null) {
MaterialSet set = (MaterialSet) materialSets.get(key.key);
MaterialSet set = materialSets.get(key.key);
return set.materialID;
}
}
@@ -136,13 +136,13 @@ public class PatternBuilder {
}
public ItemStack getShardFromSet(String materialset) {
MaterialSet set = (MaterialSet) materialSets.get(materialset);
MaterialSet set = materialSets.get(materialset);
if (set != null && set.shard != null) return set.shard.copy();
return null;
}
public ItemStack getRodFromSet(String materialset) {
MaterialSet set = (MaterialSet) materialSets.get(materialset);
MaterialSet set = materialSets.get(materialset);
if (set != null) return set.rod.copy();
return null;
}
@@ -135,7 +135,7 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
entityHit.addVelocity(
this.motionX * (double) knockback * 0.6000000238418579D / horizontalSpeed,
0.1D,
this.motionZ * (double) knockback * 0.6000000238418579D / (double) horizontalSpeed);
this.motionZ * (double) knockback * 0.6000000238418579D / horizontalSpeed);
}
}
@@ -359,7 +359,7 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
this.prevRotationYaw =
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
this.prevRotationPitch =
this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f) * 180.0D / Math.PI);
this.rotationPitch = (float) (Math.atan2(this.motionY, f) * 180.0D / Math.PI);
}
// we previously hit something. Check if the block is still there.
@@ -394,9 +394,9 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
}
} else {
this.inGround = false;
this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
this.motionX *= this.rand.nextFloat() * 0.2F;
this.motionY *= this.rand.nextFloat() * 0.2F;
this.motionZ *= this.rand.nextFloat() * 0.2F;
this.ticksInGround = 0;
this.ticksInAir = 0;
}
@@ -443,7 +443,7 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
if (ent == this.shootingEntity && this.ticksInAir < 5) continue;
f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = ent.boundingBox.expand((double) f1, (double) f1, (double) f1);
AxisAlignedBB axisalignedbb1 = ent.boundingBox.expand(f1, f1, f1);
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(curPos, newPos);
// did we actually collide with the entity, or was it just really close nearby?
@@ -145,13 +145,13 @@ public class AbilityHelper {
if (knockback > 0) {
entity.addVelocity(
(double) (-MathHelper.sin(player.rotationYaw * (float) Math.PI / 180.0F)
* (float) knockback
* 0.5F),
-MathHelper.sin(player.rotationYaw * (float) Math.PI / 180.0F)
* knockback
* 0.5F,
0.1D,
(double) (MathHelper.cos(player.rotationYaw * (float) Math.PI / 180.0F)
* (float) knockback
* 0.5F));
MathHelper.cos(player.rotationYaw * (float) Math.PI / 180.0F)
* knockback
* 0.5F);
player.motionX *= 0.6D;
player.motionZ *= 0.6D;
player.setSprinting(false);
@@ -535,9 +535,9 @@ public class AbilityHelper {
&& (block == Blocks.grass || block == Blocks.dirt)) {
Block block1 = Blocks.farmland;
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,
block1.stepSound.getStepResourcePath(),
(block1.stepSound.getVolume() + 1.0F) / 2.0F,
block1.stepSound.getPitch() * 0.8F);
@@ -34,7 +34,7 @@ public class DynamicToolPart extends CraftingItem implements IToolPart {
}
public DynamicToolPart(String texture, String name, String domain) {
this(texture, name, domain, (Class<? extends CustomMaterial>) null);
this(texture, name, domain, null);
}
public DynamicToolPart(
@@ -33,9 +33,9 @@ public abstract class BehaviorProjectileBaseDispense extends BehaviorDefaultDisp
ProjectileBase projectile = this.getProjectileEntity(world, iposition, reference);
projectile.setThrowableHeading(
(double) enumfacing.getFrontOffsetX(),
(double) ((float) enumfacing.getFrontOffsetY() + ballistic()),
(double) enumfacing.getFrontOffsetZ(),
enumfacing.getFrontOffsetX(),
(float) enumfacing.getFrontOffsetY() + ballistic(),
enumfacing.getFrontOffsetZ(),
this.accuraccy(),
this.speed());
projectile.returnStack = reference;