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

@@ -1360,9 +1360,9 @@ public class TinkerTools {
new ItemStack(TinkerTools.binding, 1, 6),
"");
if (batHardened != null)
TConstructClientRegistry.registerManualModifier("fluxmod", ironpick.copy(), (ItemStack) batHardened);
TConstructClientRegistry.registerManualModifier("fluxmod", ironpick.copy(), batHardened);
if (basicCell != null)
TConstructClientRegistry.registerManualModifier("fluxmod2", ironpick.copy(), (ItemStack) basicCell);
TConstructClientRegistry.registerManualModifier("fluxmod2", ironpick.copy(), basicCell);
/* Thaumcraft */
Object obj = ItemHelper.getStaticItem("itemResource", "thaumcraft.common.config.ConfigItems");
@@ -144,9 +144,9 @@ public class EquipBlock extends InventoryBlock {
stack.stackSize -= itemSize;
EntityItem entityitem = new EntityItem(
par1World,
(double) ((float) x + jumpX),
(double) ((float) y + jumpY),
(double) ((float) z + jumpZ),
(float) x + jumpX,
(float) y + jumpY,
(float) z + jumpZ,
new ItemStack(stack.getItem(), itemSize, stack.getItemDamage()));
if (stack.hasTagCompound()) {
@@ -155,9 +155,9 @@ public class EquipBlock extends InventoryBlock {
}
float offset = 0.05F;
entityitem.motionX = (double) ((float) rand.nextGaussian() * offset);
entityitem.motionY = (double) ((float) rand.nextGaussian() * offset + 0.2F);
entityitem.motionZ = (double) ((float) rand.nextGaussian() * offset);
entityitem.motionX = (float) rand.nextGaussian() * offset;
entityitem.motionY = (float) rand.nextGaussian() * offset + 0.2F;
entityitem.motionZ = (float) rand.nextGaussian() * offset;
par1World.spawnEntityInWorld(entityitem);
}
}
@@ -76,7 +76,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
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);
}
Block i = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
@@ -107,9 +107,9 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
}
} 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;
}
@@ -147,7 +147,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
ySpeed = 0.3F;
AxisAlignedBB axisalignedbb1 =
entity1.boundingBox.expand((double) ySpeed, (double) ySpeed, (double) ySpeed);
entity1.boundingBox.expand(ySpeed, ySpeed, ySpeed);
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3, vec31);
if (movingobjectposition1 != null) {
@@ -294,9 +294,9 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.inData = this.worldObj.getBlockMetadata(
this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.motionX = (double) ((float) (movingobjectposition.hitVec.xCoord - this.posX));
this.motionY = (double) ((float) (movingobjectposition.hitVec.yCoord - this.posY));
this.motionZ = (double) ((float) (movingobjectposition.hitVec.zCoord - this.posZ));
this.motionX = (float) (movingobjectposition.hitVec.xCoord - this.posX);
this.motionY = (float) (movingobjectposition.hitVec.yCoord - this.posY);
this.motionZ = (float) (movingobjectposition.hitVec.zCoord - this.posZ);
speed = MathHelper.sqrt_double(
this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
this.posX -= this.motionX / (double) speed * 0.05000000074505806D;
@@ -333,7 +333,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
speed = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) speed) * 180.0D / Math.PI);
for (this.rotationPitch = (float) (Math.atan2(this.motionY, speed) * 180.0D / Math.PI);
this.rotationPitch - this.prevRotationPitch < -180.0F;
this.prevRotationPitch -= 360.0F) {
}
@@ -372,10 +372,10 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
dropSpeed = 0.8F;
}
this.motionX *= (double) dropSpeed;
this.motionY *= (double) dropSpeed;
this.motionZ *= (double) dropSpeed;
this.motionY -= (double) ySpeed;
this.motionX *= dropSpeed;
this.motionY *= dropSpeed;
this.motionZ *= dropSpeed;
this.motionY -= ySpeed;
this.setPosition(this.posX, this.posY, this.posZ);
this.func_145775_I();
}
@@ -280,7 +280,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData {
tags.setShort("xTile", (short) xTile);
tags.setShort("yTile", (short) yTile);
tags.setShort("zTile", (short) zTile);
tags.setString("inTile", (String) inTile.getUnlocalizedName());
tags.setString("inTile", inTile.getUnlocalizedName());
tags.setByte("shake", (byte) arrowShake);
tags.setByte("onGround", (byte) (onGround ? 1 : 0));
tags.setBoolean("Retrieval", doNotRetrieve);
@@ -165,7 +165,7 @@ public class BattlesignGui extends GuiScreen {
@Override
protected void actionPerformed(GuiButton button) {
if (button.id == 0) {
this.mc.displayGuiScreen((GuiScreen) null);
this.mc.displayGuiScreen(null);
this.mc.setIngameFocus();
}
}
@@ -52,7 +52,7 @@ public class PartCrafterGui extends GuiContainer implements INEIGuiHandler {
public PartCrafterGui(
InventoryPlayer inventoryplayer, PartBuilderLogic partlogic, World world, int x, int y, int z) {
super((ActiveContainer) partlogic.getGuiContainer(inventoryplayer, world, x, y, z));
super(partlogic.getGuiContainer(inventoryplayer, world, x, y, z));
logic = partlogic;
drawChestPart = inventorySlots instanceof PartCrafterChestContainer;
@@ -40,7 +40,7 @@ public class ToolStationGui extends GuiContainer implements INEIGuiHandler {
public ToolStationGui(
InventoryPlayer inventoryplayer, ToolStationLogic stationlogic, World world, int x, int y, int z) {
super((ActiveContainer) stationlogic.getGuiContainer(inventoryplayer, world, x, y, z));
super(stationlogic.getGuiContainer(inventoryplayer, world, x, y, z));
this.logic = stationlogic;
toolSlots = (ToolStationContainer) inventorySlots;
text = new GuiTextField(this.fontRendererObj, 83, 8, 30, 12);
@@ -94,7 +94,7 @@ public class FrypanContainer extends Container {
}
if (slotStack.stackSize == 0) {
slot.putStack((ItemStack) null);
slot.putStack(null);
} else {
slot.onSlotChanged();
}
@@ -129,7 +129,7 @@ public class FurnaceContainer extends Container {
}
if (itemstack1.stackSize == 0) {
slot.putStack((ItemStack) null);
slot.putStack(null);
} else {
slot.onSlotChanged();
}
@@ -74,7 +74,7 @@ public class PartCrafterContainer extends ActiveContainer {
}
if (slotStack.stackSize == 0) {
slot.putStack((ItemStack) null);
slot.putStack(null);
logic.tryBuildPart(slotID);
}
slot.onSlotChanged();
@@ -62,7 +62,7 @@ public class PatternChestContainer extends Container {
}
if (slotStack.stackSize == 0) {
slot.putStack((ItemStack) null);
slot.putStack(null);
} else {
slot.onSlotChanged();
}
@@ -104,7 +104,7 @@ public class ToolStationContainer extends ActiveContainer {
}
if (slotStack.stackSize == 0) {
slot.putStack((ItemStack) null);
slot.putStack(null);
} else {
slot.onSlotChanged();
}
@@ -144,6 +144,6 @@ public class Pattern extends CraftingItem implements IPattern {
@Override
public ItemStack getPatternOutput(ItemStack stack, ItemStack input, MaterialSet set) {
return TConstructRegistry.getPartMapping((Item) this, stack.getItemDamage(), set.materialID);
return TConstructRegistry.getPartMapping(this, stack.getItemDamage(), set.materialID);
}
}
@@ -168,7 +168,7 @@ public class TitleIcon extends Item {
public static void spawnEntity(double x, double y, double z, Entity entity, World world) {
if (!world.isRemote) {
entity.setPosition(x, y, z);
((EntityLiving) entity).onSpawnWithEgg((IEntityLivingData) null);
((EntityLiving) entity).onSpawnWithEgg(null);
world.spawnEntityInWorld(entity);
}
}
@@ -178,7 +178,7 @@ public class TitleIcon extends Item {
entity.setPosition(x, y, z);
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
entity.setAngles(player.cameraYaw, player.cameraYaw);
((EntityLiving) entity).onSpawnWithEgg((IEntityLivingData) null);
((EntityLiving) entity).onSpawnWithEgg(null);
world.spawnEntityInWorld(entity);
}
}
@@ -188,7 +188,7 @@ public class TitleIcon extends Item {
if (!world.isRemote) {
entity.setPosition(x, y, z);
entity.setSlimeSize(8);
entity.onSpawnWithEgg((IEntityLivingData) null);
entity.onSpawnWithEgg(null);
world.spawnEntityInWorld(entity);
}
}
@@ -197,7 +197,7 @@ public class TitleIcon extends Item {
if (!world.isRemote) {
entity.setPosition(x, y, z);
entity.setSlimeSize(8);
entity.onSpawnWithEgg((IEntityLivingData) null);
entity.onSpawnWithEgg(null);
world.spawnEntityInWorld(entity);
}
}
@@ -79,7 +79,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
boolean burning = isBurning();
boolean updateInventory = false;
if (fuel <= 0 && canSmelt()) {
fuel = fuelGague = (int) (getItemBurnTime(inventory[1]));
fuel = fuelGague = getItemBurnTime(inventory[1]);
if (fuel > 0) {
if (inventory[1].getItem().hasContainerItem()) // Fuel slot
{
@@ -188,10 +188,10 @@ public class FancyItemRender extends Render {
par2Icon = ((TextureMap) texturemanager.getTexture(resourcelocation)).getAtlasSprite("missingno");
}
float f4 = ((IIcon) par2Icon).getMinU();
float f5 = ((IIcon) par2Icon).getMaxU();
float f6 = ((IIcon) par2Icon).getMinV();
float f7 = ((IIcon) par2Icon).getMaxV();
float f4 = par2Icon.getMinU();
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
float f8 = 1.0F;
float f9 = 0.5F;
float f10 = 0.25F;
@@ -242,8 +242,8 @@ public class FancyItemRender extends Render {
f6,
f4,
f7,
((IIcon) par2Icon).getIconWidth(),
((IIcon) par2Icon).getIconHeight(),
par2Icon.getIconWidth(),
par2Icon.getIconHeight(),
f12);
if (itemstack.hasEffect(pass)) {
@@ -471,26 +471,25 @@ public class FancyItemRender extends Render {
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(
(double) (par2 + 0),
(double) (par3 + par5),
(double) this.zLevel,
(double) ((f2 + (float) par5 * f4) * f),
(double) ((f3 + (float) par5) * f1));
par2 + 0,
par3 + par5,
this.zLevel,
(f2 + (float) par5 * f4) * f,
(f3 + (float) par5) * f1);
tessellator.addVertexWithUV(
(double) (par2 + par4),
(double) (par3 + par5),
(double) this.zLevel,
(double) ((f2 + (float) par4 + (float) par5 * f4) * f),
(double) ((f3 + (float) par5) * f1));
par2 + par4,
par3 + par5,
this.zLevel,
(f2 + (float) par4 + (float) par5 * f4) * f,
(f3 + (float) par5) * f1);
tessellator.addVertexWithUV(
(double) (par2 + par4),
(double) (par3 + 0),
(double) this.zLevel,
(double) ((f2 + (float) par4) * f),
(double) ((f3 + 0.0F) * f1));
par2 + par4,
par3 + 0,
this.zLevel,
(f2 + (float) par4) * f,
(f3 + 0.0F) * f1);
tessellator.addVertexWithUV(
(double) (par2 + 0), (double) (par3 + 0), (double) this.zLevel, (double) ((f2 + 0.0F) * f), (double)
((f3 + 0.0F) * f1));
par2 + 0, par3 + 0, this.zLevel, (f2 + 0.0F) * f, (f3 + 0.0F) * f1);
tessellator.draw();
}
}
@@ -505,7 +504,7 @@ public class FancyItemRender extends Render {
ItemStack par3ItemStack,
int par4,
int par5) {
this.renderItemOverlayIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, (String) null);
this.renderItemOverlayIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, null);
}
public void renderItemOverlayIntoGUI(
@@ -559,10 +558,10 @@ public class FancyItemRender extends Render {
private void renderQuad(Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6) {
par1Tessellator.startDrawingQuads();
par1Tessellator.setColorOpaque_I(par6);
par1Tessellator.addVertex((double) (par2 + 0), (double) (par3 + 0), 0.0D);
par1Tessellator.addVertex((double) (par2 + 0), (double) (par3 + par5), 0.0D);
par1Tessellator.addVertex((double) (par2 + par4), (double) (par3 + par5), 0.0D);
par1Tessellator.addVertex((double) (par2 + par4), (double) (par3 + 0), 0.0D);
par1Tessellator.addVertex(par2 + 0, par3 + 0, 0.0D);
par1Tessellator.addVertex(par2 + 0, par3 + par5, 0.0D);
par1Tessellator.addVertex(par2 + par4, par3 + par5, 0.0D);
par1Tessellator.addVertex(par2 + par4, par3 + 0, 0.0D);
par1Tessellator.draw();
}
@@ -570,20 +569,17 @@ public class FancyItemRender extends Render {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(
(double) (par1 + 0), (double) (par2 + par5), (double) this.zLevel, (double) par3Icon.getMinU(), (double)
par3Icon.getMaxV());
par1 + 0, par2 + par5, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(
(double) (par1 + par4),
(double) (par2 + par5),
(double) this.zLevel,
(double) par3Icon.getMaxU(),
(double) par3Icon.getMaxV());
par1 + par4,
par2 + par5,
this.zLevel,
par3Icon.getMaxU(),
par3Icon.getMaxV());
tessellator.addVertexWithUV(
(double) (par1 + par4), (double) (par2 + 0), (double) this.zLevel, (double) par3Icon.getMaxU(), (double)
par3Icon.getMinV());
par1 + par4, par2 + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.addVertexWithUV(
(double) (par1 + 0), (double) (par2 + 0), (double) this.zLevel, (double) par3Icon.getMinU(), (double)
par3Icon.getMinV());
par1 + 0, par2 + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.draw();
}