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

@@ -377,29 +377,29 @@ public class ArmorProxyClient extends ArmorProxyCommon {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(
(double) (par1 + 0),
(double) (par2 + par6),
(double) this.zLevel,
(double) ((float) (par3 + 0) * f),
(double) ((float) (par4 + par6) * f1));
par1 + 0,
par2 + par6,
this.zLevel,
(float) (par3 + 0) * f,
(float) (par4 + par6) * f1);
tessellator.addVertexWithUV(
(double) (par1 + par5),
(double) (par2 + par6),
(double) this.zLevel,
(double) ((float) (par3 + par5) * f),
(double) ((float) (par4 + par6) * f1));
par1 + par5,
par2 + par6,
this.zLevel,
(float) (par3 + par5) * f,
(float) (par4 + par6) * f1);
tessellator.addVertexWithUV(
(double) (par1 + par5),
(double) (par2 + 0),
(double) this.zLevel,
(double) ((float) (par3 + par5) * f),
(double) ((float) (par4 + 0) * f1));
par1 + par5,
par2 + 0,
this.zLevel,
(float) (par3 + par5) * f,
(float) (par4 + 0) * f1);
tessellator.addVertexWithUV(
(double) (par1 + 0),
(double) (par2 + 0),
(double) this.zLevel,
(double) ((float) (par3 + 0) * f),
(double) ((float) (par4 + 0) * f1));
par1 + 0,
par2 + 0,
this.zLevel,
(float) (par3 + 0) * f,
(float) (par4 + 0) * f1);
tessellator.draw();
}
@@ -74,7 +74,7 @@ public class PlayerAbilityHelper {
entity.boundingBox.maxY = entity.boundingBox.minY + (double) entity.height;
if (entity.width > f2 && !entity.worldObj.isRemote) {
entity.moveEntity((double) (f2 - entity.width), 0.0D, (double) (f2 - entity.width));
entity.moveEntity(f2 - entity.width, 0.0D, f2 - entity.width);
}
}
@@ -120,10 +120,10 @@ public class ArmorExtendedGui extends InventoryEffectRenderer {
GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
RenderHelper.enableStandardItemLighting();
GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-((float) Math.atan((double) (par5 / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);
par0Minecraft.thePlayer.renderYawOffset = (float) Math.atan((double) (par4 / 40.0F)) * 20.0F;
par0Minecraft.thePlayer.rotationYaw = (float) Math.atan((double) (par4 / 40.0F)) * 40.0F;
par0Minecraft.thePlayer.rotationPitch = -((float) Math.atan((double) (par5 / 40.0F))) * 20.0F;
GL11.glRotatef(-((float) Math.atan(par5 / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F);
par0Minecraft.thePlayer.renderYawOffset = (float) Math.atan(par4 / 40.0F) * 20.0F;
par0Minecraft.thePlayer.rotationYaw = (float) Math.atan(par4 / 40.0F) * 40.0F;
par0Minecraft.thePlayer.rotationPitch = -((float) Math.atan(par5 / 40.0F)) * 20.0F;
par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw;
GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F);
RenderManager.instance.playerViewY = 180.0F;
@@ -55,7 +55,7 @@ public class KnapsackContainer extends Container {
}
if (slotStack.stackSize == 0) {
slot.putStack((ItemStack) null);
slot.putStack(null);
} else {
slot.onSlotChanged();
}
@@ -74,17 +74,17 @@ public class RenderArmorCast implements IItemRenderer {
public void renderCube(Tessellator tessellator, RenderBlocks renderer, IIcon icon) {
tessellator.startDrawingQuads();
tessellator.setNormal(-1F, 0F, 0F);
renderer.renderFaceXNeg((Block) null, 0F, 0F, 0F, icon);
renderer.renderFaceXNeg(null, 0F, 0F, 0F, icon);
tessellator.setNormal(1F, 0F, 0F);
renderer.renderFaceXPos((Block) null, 0F, 0F, 0F, icon);
renderer.renderFaceXPos(null, 0F, 0F, 0F, icon);
tessellator.setNormal(0F, -1F, 0F);
renderer.renderFaceYNeg((Block) null, 0F, 0F, 0F, icon);
renderer.renderFaceYNeg(null, 0F, 0F, 0F, icon);
tessellator.setNormal(0F, 1F, 0F);
renderer.renderFaceYPos((Block) null, 0F, 0F, 0F, icon);
renderer.renderFaceYPos(null, 0F, 0F, 0F, icon);
tessellator.setNormal(0F, 0F, -1F);
renderer.renderFaceZNeg((Block) null, 0F, 0F, 0F, icon);
renderer.renderFaceZNeg(null, 0F, 0F, 0F, icon);
tessellator.setNormal(0F, 0F, 1F);
renderer.renderFaceZPos((Block) null, 0F, 0F, 0F, icon);
renderer.renderFaceZPos(null, 0F, 0F, 0F, icon);
tessellator.draw();
}
@@ -92,17 +92,17 @@ public class RenderArmorCast implements IItemRenderer {
Tessellator tessellator, RenderBlocks renderer, IIcon icon, List<ForgeDirection> sidesToRender) {
tessellator.startDrawingQuads();
tessellator.setNormal(-1F, 0F, 0F);
if (sidesToRender.contains(ForgeDirection.WEST)) renderer.renderFaceXNeg((Block) null, 0F, 0F, 0F, icon);
if (sidesToRender.contains(ForgeDirection.WEST)) renderer.renderFaceXNeg(null, 0F, 0F, 0F, icon);
tessellator.setNormal(1F, 0F, 0F);
if (sidesToRender.contains(ForgeDirection.EAST)) renderer.renderFaceXPos((Block) null, 0F, 0F, 0F, icon);
if (sidesToRender.contains(ForgeDirection.EAST)) renderer.renderFaceXPos(null, 0F, 0F, 0F, icon);
tessellator.setNormal(0F, -1F, 0F);
if (sidesToRender.contains(ForgeDirection.DOWN)) renderer.renderFaceYNeg((Block) null, 0F, 0F, 0F, icon);
if (sidesToRender.contains(ForgeDirection.DOWN)) renderer.renderFaceYNeg(null, 0F, 0F, 0F, icon);
tessellator.setNormal(0F, 1F, 0F);
if (sidesToRender.contains(ForgeDirection.UP)) renderer.renderFaceYPos((Block) null, 0F, 0F, 0F, icon);
if (sidesToRender.contains(ForgeDirection.UP)) renderer.renderFaceYPos(null, 0F, 0F, 0F, icon);
tessellator.setNormal(0F, 0F, -1F);
if (sidesToRender.contains(ForgeDirection.SOUTH)) renderer.renderFaceZNeg((Block) null, 0F, 0F, 0F, icon);
if (sidesToRender.contains(ForgeDirection.SOUTH)) renderer.renderFaceZNeg(null, 0F, 0F, 0F, icon);
tessellator.setNormal(0F, 0F, 1F);
if (sidesToRender.contains(ForgeDirection.NORTH)) renderer.renderFaceZPos((Block) null, 0F, 0F, 0F, icon);
if (sidesToRender.contains(ForgeDirection.NORTH)) renderer.renderFaceZPos(null, 0F, 0F, 0F, icon);
tessellator.draw();
}
@@ -150,20 +150,20 @@ public class RenderArmorCast implements IItemRenderer {
float par7) {
par0Tessellator.startDrawingQuads();
par0Tessellator.setNormal(0.0F, 0.0F, 1.0F);
par0Tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, (double) par1, (double) par4);
par0Tessellator.addVertexWithUV(1.0D, 0.0D, 0.0D, (double) par3, (double) par4);
par0Tessellator.addVertexWithUV(1.0D, 1.0D, 0.0D, (double) par3, (double) par2);
par0Tessellator.addVertexWithUV(0.0D, 1.0D, 0.0D, (double) par1, (double) par2);
par0Tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, par1, par4);
par0Tessellator.addVertexWithUV(1.0D, 0.0D, 0.0D, par3, par4);
par0Tessellator.addVertexWithUV(1.0D, 1.0D, 0.0D, par3, par2);
par0Tessellator.addVertexWithUV(0.0D, 1.0D, 0.0D, par1, par2);
par0Tessellator.draw();
par0Tessellator.startDrawingQuads();
par0Tessellator.setNormal(0.0F, 0.0F, -1.0F);
par0Tessellator.addVertexWithUV(0.0D, 1.0D, (double) (0.0F - par7), (double) par1, (double) par2);
par0Tessellator.addVertexWithUV(1.0D, 1.0D, (double) (0.0F - par7), (double) par3, (double) par2);
par0Tessellator.addVertexWithUV(1.0D, 0.0D, (double) (0.0F - par7), (double) par3, (double) par4);
par0Tessellator.addVertexWithUV(0.0D, 0.0D, (double) (0.0F - par7), (double) par1, (double) par4);
par0Tessellator.addVertexWithUV(0.0D, 1.0D, 0.0F - par7, par1, par2);
par0Tessellator.addVertexWithUV(1.0D, 1.0D, 0.0F - par7, par3, par2);
par0Tessellator.addVertexWithUV(1.0D, 0.0D, 0.0F - par7, par3, par4);
par0Tessellator.addVertexWithUV(0.0D, 0.0D, 0.0F - par7, par1, par4);
par0Tessellator.draw();
float f5 = 0.5F * (par1 - par3) / (float) par5;
float f6 = 0.5F * (par4 - par2) / (float) par6;
float f5 = 0.5F * (par1 - par3) / par5;
float f6 = 0.5F * (par4 - par2) / par6;
par0Tessellator.startDrawingQuads();
par0Tessellator.setNormal(-1.0F, 0.0F, 0.0F);
int k;
@@ -171,12 +171,12 @@ public class RenderArmorCast implements IItemRenderer {
float f8;
for (k = 0; k < par5; ++k) {
f7 = (float) k / (float) par5;
f7 = (float) k / par5;
f8 = par1 + (par3 - par1) * f7 - f5;
par0Tessellator.addVertexWithUV((double) f7, 0.0D, (double) (0.0F - par7), (double) f8, (double) par4);
par0Tessellator.addVertexWithUV((double) f7, 0.0D, 0.0D, (double) f8, (double) par4);
par0Tessellator.addVertexWithUV((double) f7, 1.0D, 0.0D, (double) f8, (double) par2);
par0Tessellator.addVertexWithUV((double) f7, 1.0D, (double) (0.0F - par7), (double) f8, (double) par2);
par0Tessellator.addVertexWithUV(f7, 0.0D, 0.0F - par7, f8, par4);
par0Tessellator.addVertexWithUV(f7, 0.0D, 0.0D, f8, par4);
par0Tessellator.addVertexWithUV(f7, 1.0D, 0.0D, f8, par2);
par0Tessellator.addVertexWithUV(f7, 1.0D, 0.0F - par7, f8, par2);
}
par0Tessellator.draw();
@@ -185,13 +185,13 @@ public class RenderArmorCast implements IItemRenderer {
float f9;
for (k = 0; k < par5; ++k) {
f7 = (float) k / (float) par5;
f7 = (float) k / par5;
f8 = par1 + (par3 - par1) * f7 - f5;
f9 = f7 + 1.0F / (float) par5;
par0Tessellator.addVertexWithUV((double) f9, 1.0D, (double) (0.0F - par7), (double) f8, (double) par2);
par0Tessellator.addVertexWithUV((double) f9, 1.0D, 0.0D, (double) f8, (double) par2);
par0Tessellator.addVertexWithUV((double) f9, 0.0D, 0.0D, (double) f8, (double) par4);
par0Tessellator.addVertexWithUV((double) f9, 0.0D, (double) (0.0F - par7), (double) f8, (double) par4);
f9 = f7 + 1.0F / par5;
par0Tessellator.addVertexWithUV(f9, 1.0D, 0.0F - par7, f8, par2);
par0Tessellator.addVertexWithUV(f9, 1.0D, 0.0D, f8, par2);
par0Tessellator.addVertexWithUV(f9, 0.0D, 0.0D, f8, par4);
par0Tessellator.addVertexWithUV(f9, 0.0D, 0.0F - par7, f8, par4);
}
par0Tessellator.draw();
@@ -199,13 +199,13 @@ public class RenderArmorCast implements IItemRenderer {
par0Tessellator.setNormal(0.0F, 1.0F, 0.0F);
for (k = 0; k < par6; ++k) {
f7 = (float) k / (float) par6;
f7 = (float) k / par6;
f8 = par4 + (par2 - par4) * f7 - f6;
f9 = f7 + 1.0F / (float) par6;
par0Tessellator.addVertexWithUV(0.0D, (double) f9, 0.0D, (double) par1, (double) f8);
par0Tessellator.addVertexWithUV(1.0D, (double) f9, 0.0D, (double) par3, (double) f8);
par0Tessellator.addVertexWithUV(1.0D, (double) f9, (double) (0.0F - par7), (double) par3, (double) f8);
par0Tessellator.addVertexWithUV(0.0D, (double) f9, (double) (0.0F - par7), (double) par1, (double) f8);
f9 = f7 + 1.0F / par6;
par0Tessellator.addVertexWithUV(0.0D, f9, 0.0D, par1, f8);
par0Tessellator.addVertexWithUV(1.0D, f9, 0.0D, par3, f8);
par0Tessellator.addVertexWithUV(1.0D, f9, 0.0F - par7, par3, f8);
par0Tessellator.addVertexWithUV(0.0D, f9, 0.0F - par7, par1, f8);
}
par0Tessellator.draw();
@@ -213,12 +213,12 @@ public class RenderArmorCast implements IItemRenderer {
par0Tessellator.setNormal(0.0F, -1.0F, 0.0F);
for (k = 0; k < par6; ++k) {
f7 = (float) k / (float) par6;
f7 = (float) k / par6;
f8 = par4 + (par2 - par4) * f7 - f6;
par0Tessellator.addVertexWithUV(1.0D, (double) f7, 0.0D, (double) par3, (double) f8);
par0Tessellator.addVertexWithUV(0.0D, (double) f7, 0.0D, (double) par1, (double) f8);
par0Tessellator.addVertexWithUV(0.0D, (double) f7, (double) (0.0F - par7), (double) par1, (double) f8);
par0Tessellator.addVertexWithUV(1.0D, (double) f7, (double) (0.0F - par7), (double) par3, (double) f8);
par0Tessellator.addVertexWithUV(1.0D, f7, 0.0D, par3, f8);
par0Tessellator.addVertexWithUV(0.0D, f7, 0.0D, par1, f8);
par0Tessellator.addVertexWithUV(0.0D, f7, 0.0F - par7, par1, f8);
par0Tessellator.addVertexWithUV(1.0D, f7, 0.0F - par7, par3, f8);
}
par0Tessellator.draw();
@@ -186,7 +186,7 @@ public class ArmorExtended implements IInventory {
if (tagCompound != null) {
NBTTagList tagList = tagCompound.getTagList("Inventory", 10);
for (int i = 0; i < tagList.tagCount(); ++i) {
NBTTagCompound nbttagcompound = (NBTTagCompound) tagList.getCompoundTagAt(i);
NBTTagCompound nbttagcompound = tagList.getCompoundTagAt(i);
int j = nbttagcompound.getByte("Slot") & 255;
ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttagcompound);
@@ -121,7 +121,7 @@ public class KnapsackInventory implements IInventory {
NBTTagList tagList = tagCompound.getTagList("Knapsack", 10);
for (int i = 0; i < tagList.tagCount(); ++i) {
NBTTagCompound nbttagcompound = (NBTTagCompound) tagList.getCompoundTagAt(i);
NBTTagCompound nbttagcompound = tagList.getCompoundTagAt(i);
int j = nbttagcompound.getByte("Slot") & 255;
ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttagcompound);
@@ -215,7 +215,7 @@ public class TPlayerHandler {
if (!event.entity.worldObj.isRemote) {
TPlayerStats properties = (TPlayerStats) event.entity.getExtendedProperties(TPlayerStats.PROP_NAME);
properties.hunger = ((EntityPlayer) event.entity).getFoodStats().getFoodLevel();
playerStats.put(((EntityPlayer) event.entity).getPersistentID(), properties);
playerStats.put(event.entity.getPersistentID(), properties);
}
}