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

@@ -193,7 +193,7 @@ public class BlockSkinRenderHelper {
render.colorRedTopRight *= f6;
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
render.renderFaceYNeg(block, (double) xPos, (double) yPos, (double) zPos, block.getIcon(0, metadata));
render.renderFaceYNeg(block, xPos, yPos, zPos, block.getIcon(0, metadata));
flag = true;
}
@@ -313,7 +313,7 @@ public class BlockSkinRenderHelper {
render.colorRedTopRight *= f6;
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
render.renderFaceYPos(block, (double) xPos, (double) yPos, (double) zPos, block.getIcon(1, metadata));
render.renderFaceYPos(block, xPos, yPos, zPos, block.getIcon(1, metadata));
flag = true;
}
@@ -447,7 +447,7 @@ public class BlockSkinRenderHelper {
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
icon = block.getIcon(2, metadata);
render.renderFaceZNeg(block, (double) xPos, (double) yPos, (double) zPos, icon);
render.renderFaceZNeg(block, xPos, yPos, zPos, icon);
flag = true;
}
@@ -580,7 +580,7 @@ public class BlockSkinRenderHelper {
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
icon = block.getIcon(3, metadata);
render.renderFaceZPos(block, (double) xPos, (double) yPos, (double) zPos, icon);
render.renderFaceZPos(block, xPos, yPos, zPos, icon);
flag = true;
}
@@ -713,7 +713,7 @@ public class BlockSkinRenderHelper {
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
icon = block.getIcon(4, metadata);
render.renderFaceXNeg(block, (double) xPos, (double) yPos, (double) zPos, icon);
render.renderFaceXNeg(block, xPos, yPos, zPos, icon);
flag = true;
}
@@ -846,7 +846,7 @@ public class BlockSkinRenderHelper {
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
icon = block.getIcon(5, metadata);
render.renderFaceXPos(block, (double) xPos, (double) yPos, (double) zPos, icon);
render.renderFaceXPos(block, xPos, yPos, zPos, icon);
flag = true;
}
@@ -906,7 +906,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos - 1, zPos));
tessellator.setColorOpaque_F(f10, f13, f16);
render.renderFaceYNeg(block, (double) xPos, (double) yPos, (double) zPos, block.getIcon(0, metadata));
render.renderFaceYNeg(block, xPos, yPos, zPos, block.getIcon(0, metadata));
flag = true;
}
@@ -916,7 +916,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos + 1, zPos));
tessellator.setColorOpaque_F(f7, f8, f9);
render.renderFaceYPos(block, (double) xPos, (double) yPos, (double) zPos, block.getIcon(1, metadata));
render.renderFaceYPos(block, xPos, yPos, zPos, block.getIcon(1, metadata));
flag = true;
}
@@ -928,7 +928,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos, zPos - 1));
tessellator.setColorOpaque_F(f11, f14, f17);
render.renderFaceZNeg(block, (double) xPos, (double) yPos, (double) zPos, block.getIcon(2, metadata));
render.renderFaceZNeg(block, xPos, yPos, zPos, block.getIcon(2, metadata));
flag = true;
}
@@ -939,7 +939,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos, zPos + 1));
tessellator.setColorOpaque_F(f11, f14, f17);
render.renderFaceZPos(block, (double) xPos, (double) yPos, (double) zPos, block.getIcon(3, metadata));
render.renderFaceZPos(block, xPos, yPos, zPos, block.getIcon(3, metadata));
flag = true;
}
@@ -950,7 +950,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos - 1, yPos, zPos));
tessellator.setColorOpaque_F(f12, f15, f18);
render.renderFaceXNeg(block, (double) xPos, (double) yPos, (double) zPos, block.getIcon(4, metadata));
render.renderFaceXNeg(block, xPos, yPos, zPos, block.getIcon(4, metadata));
flag = true;
}
@@ -961,7 +961,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos + 1, yPos, zPos));
tessellator.setColorOpaque_F(f12, f15, f18);
render.renderFaceXPos(block, (double) xPos, (double) yPos, (double) zPos, block.getIcon(5, metadata));
render.renderFaceXPos(block, xPos, yPos, zPos, block.getIcon(5, metadata));
flag = true;
}
@@ -1204,7 +1204,7 @@ public class BlockSkinRenderHelper {
render.colorRedTopRight *= f6;
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
render.renderFaceYNeg(block, (double) xPos, (double) yPos, (double) zPos, stillIcon);
render.renderFaceYNeg(block, xPos, yPos, zPos, stillIcon);
flag = true;
}
@@ -1324,7 +1324,7 @@ public class BlockSkinRenderHelper {
render.colorRedTopRight *= f6;
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
render.renderFaceYPos(block, (double) xPos, (double) yPos, (double) zPos, stillIcon);
render.renderFaceYPos(block, xPos, yPos, zPos, stillIcon);
flag = true;
}
@@ -1455,7 +1455,7 @@ public class BlockSkinRenderHelper {
render.colorRedTopRight *= f6;
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
render.renderFaceZNeg(block, (double) xPos, (double) yPos, (double) zPos, flowingIcon);
render.renderFaceZNeg(block, xPos, yPos, zPos, flowingIcon);
flag = true;
}
@@ -1587,7 +1587,7 @@ public class BlockSkinRenderHelper {
render.colorRedTopRight *= f6;
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
render.renderFaceZPos(block, (double) xPos, (double) yPos, (double) zPos, flowingIcon);
render.renderFaceZPos(block, xPos, yPos, zPos, flowingIcon);
flag = true;
}
@@ -1719,7 +1719,7 @@ public class BlockSkinRenderHelper {
render.colorRedTopRight *= f6;
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
render.renderFaceXNeg(block, (double) xPos, (double) yPos, (double) zPos, flowingIcon);
render.renderFaceXNeg(block, xPos, yPos, zPos, flowingIcon);
flag = true;
}
@@ -1851,7 +1851,7 @@ public class BlockSkinRenderHelper {
render.colorRedTopRight *= f6;
render.colorGreenTopRight *= f6;
render.colorBlueTopRight *= f6;
render.renderFaceXPos(block, (double) xPos, (double) yPos, (double) zPos, flowingIcon);
render.renderFaceXPos(block, xPos, yPos, zPos, flowingIcon);
flag = true;
}
@@ -1912,7 +1912,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos - 1, zPos));
tessellator.setColorOpaque_F(f10, f13, f16);
render.renderFaceYNeg(block, (double) xPos, (double) yPos, (double) zPos, stillIcon);
render.renderFaceYNeg(block, xPos, yPos, zPos, stillIcon);
flag = true;
}
@@ -1922,7 +1922,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos + 1, zPos));
tessellator.setColorOpaque_F(f7, f8, f9);
render.renderFaceYPos(block, (double) xPos, (double) yPos, (double) zPos, stillIcon);
render.renderFaceYPos(block, xPos, yPos, zPos, stillIcon);
flag = true;
}
@@ -1934,7 +1934,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos, zPos - 1));
tessellator.setColorOpaque_F(f11, f14, f17);
render.renderFaceZNeg(block, (double) xPos, (double) yPos, (double) zPos, flowingIcon);
render.renderFaceZNeg(block, xPos, yPos, zPos, flowingIcon);
flag = true;
}
@@ -1945,7 +1945,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos, zPos + 1));
tessellator.setColorOpaque_F(f11, f14, f17);
render.renderFaceZPos(block, (double) xPos, (double) yPos, (double) zPos, flowingIcon);
render.renderFaceZPos(block, xPos, yPos, zPos, flowingIcon);
flag = true;
}
@@ -1956,7 +1956,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos - 1, yPos, zPos));
tessellator.setColorOpaque_F(f12, f15, f18);
render.renderFaceXNeg(block, (double) xPos, (double) yPos, (double) zPos, flowingIcon);
render.renderFaceXNeg(block, xPos, yPos, zPos, flowingIcon);
flag = true;
}
@@ -1967,7 +1967,7 @@ public class BlockSkinRenderHelper {
? l
: block.getMixedBrightnessForBlock(render.blockAccess, xPos + 1, yPos, zPos));
tessellator.setColorOpaque_F(f12, f15, f18);
render.renderFaceXPos(block, (double) xPos, (double) yPos, (double) zPos, flowingIcon);
render.renderFaceXPos(block, xPos, yPos, zPos, flowingIcon);
flag = true;
}
+24 -24
View File
@@ -55,10 +55,10 @@ public class BreakingFX extends EntityFX {
float f10 = 0.1F * this.particleScale;
if (this.particleIcon != null) {
f6 = this.particleIcon.getInterpolatedU((double) (this.particleTextureJitterX / 4.0F * 16.0F));
f7 = this.particleIcon.getInterpolatedU((double) ((this.particleTextureJitterX + 1.0F) / 4.0F * 16.0F));
f8 = this.particleIcon.getInterpolatedV((double) (this.particleTextureJitterY / 4.0F * 16.0F));
f9 = this.particleIcon.getInterpolatedV((double) ((this.particleTextureJitterY + 1.0F) / 4.0F * 16.0F));
f6 = this.particleIcon.getInterpolatedU(this.particleTextureJitterX / 4.0F * 16.0F);
f7 = this.particleIcon.getInterpolatedU((this.particleTextureJitterX + 1.0F) / 4.0F * 16.0F);
f8 = this.particleIcon.getInterpolatedV(this.particleTextureJitterY / 4.0F * 16.0F);
f9 = this.particleIcon.getInterpolatedV((this.particleTextureJitterY + 1.0F) / 4.0F * 16.0F);
}
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
@@ -67,28 +67,28 @@ public class BreakingFX extends EntityFX {
float f14 = 1.0F;
par1Tessellator.setColorOpaque_F(f14 * this.particleRed, f14 * this.particleGreen, f14 * this.particleBlue);
par1Tessellator.addVertexWithUV(
(double) (f11 - par3 * f10 - par6 * f10),
(double) (f12 - par4 * f10),
(double) (f13 - par5 * f10 - par7 * f10),
(double) f6,
(double) f9);
f11 - par3 * f10 - par6 * f10,
f12 - par4 * f10,
f13 - par5 * f10 - par7 * f10,
f6,
f9);
par1Tessellator.addVertexWithUV(
(double) (f11 - par3 * f10 + par6 * f10),
(double) (f12 + par4 * f10),
(double) (f13 - par5 * f10 + par7 * f10),
(double) f6,
(double) f8);
f11 - par3 * f10 + par6 * f10,
f12 + par4 * f10,
f13 - par5 * f10 + par7 * f10,
f6,
f8);
par1Tessellator.addVertexWithUV(
(double) (f11 + par3 * f10 + par6 * f10),
(double) (f12 + par4 * f10),
(double) (f13 + par5 * f10 + par7 * f10),
(double) f7,
(double) f8);
f11 + par3 * f10 + par6 * f10,
f12 + par4 * f10,
f13 + par5 * f10 + par7 * f10,
f7,
f8);
par1Tessellator.addVertexWithUV(
(double) (f11 + par3 * f10 - par6 * f10),
(double) (f12 - par4 * f10),
(double) (f13 + par5 * f10 - par7 * f10),
(double) f7,
(double) f9);
f11 + par3 * f10 - par6 * f10,
f12 - par4 * f10,
f13 + par5 * f10 - par7 * f10,
f7,
f9);
}
}
@@ -159,10 +159,10 @@ public class ArrowRender 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;
@@ -216,8 +216,8 @@ public class ArrowRender extends Render {
f6,
f4,
f7,
((IIcon) par2Icon).getIconWidth(),
((IIcon) par2Icon).getIconHeight(),
par2Icon.getIconWidth(),
par2Icon.getIconHeight(),
f12);
if (itemstack.hasEffect(pass)) {
@@ -176,10 +176,10 @@ public class DaggerRender 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;
@@ -227,8 +227,8 @@ public class DaggerRender extends Render {
f6,
f4,
f7,
((IIcon) par2Icon).getIconWidth(),
((IIcon) par2Icon).getIconHeight(),
par2Icon.getIconWidth(),
par2Icon.getIconHeight(),
f12);
/*
@@ -444,26 +444,25 @@ public class DaggerRender 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();
}
}
@@ -478,7 +477,7 @@ public class DaggerRender 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(
@@ -532,10 +531,10 @@ public class DaggerRender 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();
}
@@ -543,20 +542,17 @@ public class DaggerRender 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();
}
@@ -80,10 +80,10 @@ public class LaunchedItemRender extends Render {
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
par1Tessellator.startDrawingQuads();
par1Tessellator.setNormal(0.0F, 1.0F, 0.0F);
par1Tessellator.addVertexWithUV((double) (0.0F - f5), (double) (0.0F - f6), 0.0D, (double) f, (double) f3);
par1Tessellator.addVertexWithUV((double) (f4 - f5), (double) (0.0F - f6), 0.0D, (double) f1, (double) f3);
par1Tessellator.addVertexWithUV((double) (f4 - f5), (double) (f4 - f6), 0.0D, (double) f1, (double) f2);
par1Tessellator.addVertexWithUV((double) (0.0F - f5), (double) (f4 - f6), 0.0D, (double) f, (double) f2);
par1Tessellator.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
par1Tessellator.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
par1Tessellator.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
par1Tessellator.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
par1Tessellator.draw();
}
}