From bacfcf27f534414d8dccfb6c4c38235cefae0c36 Mon Sep 17 00:00:00 2001 From: octarine-noise Date: Wed, 25 Mar 2015 15:41:11 +0100 Subject: [PATCH] remove unnecessary parameters --- .../client/render/RenderBlockAOBase.java | 27 ++++--------------- .../client/render/impl/RenderBlockCactus.java | 2 +- .../client/render/impl/RenderBlockLeaves.java | 16 +++++------ 3 files changed, 14 insertions(+), 31 deletions(-) diff --git a/src/main/java/mods/betterfoliage/client/render/RenderBlockAOBase.java b/src/main/java/mods/betterfoliage/client/render/RenderBlockAOBase.java index 9c18f3a8..646dd23a 100644 --- a/src/main/java/mods/betterfoliage/client/render/RenderBlockAOBase.java +++ b/src/main/java/mods/betterfoliage/client/render/RenderBlockAOBase.java @@ -325,7 +325,7 @@ public void renderCrossedSideQuads(Double3 drawBase, ForgeDirection dir, double } } - protected void renderCrossedBlockQuadsTranslate(ForgeDirection axisMain, Double3 blockCenter, double halfSize, Double3 offsetVec, IIcon crossLeafIcon, int uvRot, boolean isAirTop, boolean isAirBottom) { + protected void renderCrossedBlockQuadsTranslate(ForgeDirection axisMain, Double3 blockCenter, double halfSize, Double3 offsetVec, IIcon crossLeafIcon, int uvRot) { Double3 drawCenter = blockCenter; if (offsetVec != null) drawCenter = drawCenter.add(offsetVec); @@ -336,10 +336,10 @@ protected void renderCrossedBlockQuadsTranslate(ForgeDirection axisMain, Double3 Double3 horz2 = axis1.sub(axis2).scale(halfSize); Double3 vert1 = new Double3(axisMain).scale(halfSize * 1.41); - renderCrossedBlockQuadsInternal(axisMain, drawCenter, horz1, horz2, vert1, crossLeafIcon, uvRot, isAirTop, isAirBottom); + renderCrossedBlockQuadsInternal(axisMain, drawCenter, horz1, horz2, vert1, crossLeafIcon, uvRot); } - protected void renderCrossedBlockQuadsSkew(ForgeDirection axisMain, Double3 blockCenter, double halfSize, Double3 offsetVec1, Double3 offsetVec2, IIcon crossLeafIcon, int uvRot, boolean isAirTop, boolean isAirBottom) { + protected void renderCrossedBlockQuadsSkew(ForgeDirection axisMain, Double3 blockCenter, double halfSize, Double3 offsetVec1, Double3 offsetVec2, IIcon crossLeafIcon, int uvRot) { Double3 axis1 = new Double3(faceDir1[axisMain.ordinal()]); Double3 axis2 = new Double3(faceDir2[axisMain.ordinal()]); @@ -347,11 +347,10 @@ protected void renderCrossedBlockQuadsSkew(ForgeDirection axisMain, Double3 bloc Double3 horz2 = axis1.sub(axis2).scale(halfSize).add(axis1.scale(offsetVec2.x)).add(axis2.scale(offsetVec2.z)).add(new Double3(axisMain).scale(offsetVec2.y)); Double3 vert1 = new Double3(axisMain).scale(halfSize * 1.41); - renderCrossedBlockQuadsInternal(axisMain, blockCenter, horz1, horz2, vert1, crossLeafIcon, uvRot, isAirTop, isAirBottom); + renderCrossedBlockQuadsInternal(axisMain, blockCenter, horz1, horz2, vert1, crossLeafIcon, uvRot); } - private void renderCrossedBlockQuadsInternal(ForgeDirection axisMain, Double3 drawCenter, Double3 horz1, Double3 horz2, Double3 vert1, IIcon crossLeafIcon, int uvRot, boolean isAirTop, boolean isAirBottom) { - // XYZ NPP + private void renderCrossedBlockQuadsInternal(ForgeDirection axisMain, Double3 drawCenter, Double3 horz1, Double3 horz2, Double3 vert1, IIcon crossLeafIcon, int uvRot) { if (Minecraft.isAmbientOcclusionEnabled() && !noShading) { ForgeDirection axis1 = faceDir1[axisMain.ordinal()]; ForgeDirection axis2 = faceDir2[axisMain.ordinal()]; @@ -361,37 +360,21 @@ private void renderCrossedBlockQuadsInternal(ForgeDirection axisMain, Double3 dr getAoLookupMax(axisMain, axis1, axis2.getOpposite()), getAoLookupMax(axisMain.getOpposite(), axis1, axis2.getOpposite()), getAoLookupMax(axisMain.getOpposite(), axis2, axis1.getOpposite())); -// isAirTop ? getAoLookup(axisMain, axis1.getOpposite(), axis2) : getAoLookup(axis2, axis1.getOpposite(), axisMain), -// isAirTop ? getAoLookup(axisMain, axis1, axis2.getOpposite()) : getAoLookup(axis1, axis2.getOpposite(), axisMain), -// isAirBottom ? getAoLookup(axisMain.getOpposite(), axis1, axis2.getOpposite()) : getAoLookup(axis1, axisMain.getOpposite(), axis2.getOpposite()), -// isAirBottom ? getAoLookup(axisMain.getOpposite(), axis1.getOpposite(), axis2) : getAoLookup(axis2, axis1.getOpposite(), axisMain.getOpposite())); renderQuadWithShading(crossLeafIcon, drawCenter, horz1.inverse(), vert1, uvRot, getAoLookupMax(axisMain, axis2.getOpposite(), axis1), getAoLookupMax(axisMain, axis1.getOpposite(), axis2), getAoLookupMax(axisMain.getOpposite(), axis1.getOpposite(), axis2), getAoLookupMax(axisMain.getOpposite(), axis2.getOpposite(), axis1)); -// isAirTop ? getAoLookup(axisMain, axis1, axis2.getOpposite()) : getAoLookup(axis2.getOpposite(), axis1, axisMain), -// isAirTop ? getAoLookup(axisMain, axis1.getOpposite(), axis2) : getAoLookup(axis1.getOpposite(), axis2, axisMain), -// isAirBottom ? getAoLookup(axisMain.getOpposite(), axis1.getOpposite(), axis2) : getAoLookup(axis1.getOpposite(), axisMain.getOpposite(), axis2), -// isAirBottom ? getAoLookup(axisMain.getOpposite(), axis1, axis2.getOpposite()) : getAoLookup(axis2.getOpposite(), axis1, axisMain.getOpposite())); renderQuadWithShading(crossLeafIcon, drawCenter, horz2, vert1, uvRot, getAoLookupMax(axisMain, axis1.getOpposite(), axis2.getOpposite()), getAoLookupMax(axisMain, axis2, axis1), getAoLookupMax(axisMain.getOpposite(), axis2, axis1), getAoLookupMax(axisMain.getOpposite(), axis1.getOpposite(), axis2.getOpposite())); -// isAirTop ? getAoLookup(axisMain, axis1.getOpposite(), axis2.getOpposite()) : getAoLookup(axis1.getOpposite(), axisMain, axis2.getOpposite()), -// isAirTop ? getAoLookup(axisMain, axis1, axis2) : getAoLookup(axis2, axis1, axisMain), -// isAirBottom ? getAoLookup(axisMain.getOpposite(), axis1, axis2) : getAoLookup(axis2, axis1, axisMain.getOpposite()), -// isAirBottom ? getAoLookup(axisMain.getOpposite(), axis1.getOpposite(), axis2.getOpposite()) : getAoLookup(axis1.getOpposite(), axis2.getOpposite(), axisMain.getOpposite())); renderQuadWithShading(crossLeafIcon, drawCenter, horz2.inverse(), vert1, uvRot, getAoLookupMax(axisMain, axis1, axis2), getAoLookupMax(axisMain, axis2.getOpposite(), axis1.getOpposite()), getAoLookupMax(axisMain.getOpposite(), axis2.getOpposite(), axis1.getOpposite()), getAoLookupMax(axisMain.getOpposite(), axis1, axis2)); -// isAirTop ? getAoLookup(axisMain, axis1, axis2) : getAoLookup(axis1, axis2, axisMain), -// isAirTop ? getAoLookup(axisMain, axis1.getOpposite(), axis2.getOpposite()) : getAoLookup(axis2.getOpposite(), axis1.getOpposite(), axisMain), -// isAirBottom ? getAoLookup(axisMain.getOpposite(), axis1.getOpposite(), axis2.getOpposite()) : getAoLookup(axis2.getOpposite(), axis1.getOpposite(), axisMain.getOpposite()), -// isAirBottom ? getAoLookup(axisMain.getOpposite(), axis1, axis2) : getAoLookup(axis1, axis2, axisMain.getOpposite())); } else { renderQuad(crossLeafIcon, drawCenter, horz1, vert1, uvRot); renderQuad(crossLeafIcon, drawCenter, horz1.inverse(), vert1, uvRot); diff --git a/src/main/java/mods/betterfoliage/client/render/impl/RenderBlockCactus.java b/src/main/java/mods/betterfoliage/client/render/impl/RenderBlockCactus.java index 6d8c3248..652d4c0f 100644 --- a/src/main/java/mods/betterfoliage/client/render/impl/RenderBlockCactus.java +++ b/src/main/java/mods/betterfoliage/client/render/impl/RenderBlockCactus.java @@ -69,7 +69,7 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b renderCrossedBlockQuadsSkew(ForgeDirection.UP, blockCenter, 0.65, pRot[iconVariation].scaleAxes(0.1, 0.0, 0.1), - pRot[(iconVariation + 1) & 63].scaleAxes(0.1, 0.0, 0.1), cactusRoundIcon, iconVariation, false, false); + pRot[(iconVariation + 1) & 63].scaleAxes(0.1, 0.0, 0.1), cactusRoundIcon, iconVariation); return true; } diff --git a/src/main/java/mods/betterfoliage/client/render/impl/RenderBlockLeaves.java b/src/main/java/mods/betterfoliage/client/render/impl/RenderBlockLeaves.java index 8a6dbd5b..43234402 100644 --- a/src/main/java/mods/betterfoliage/client/render/impl/RenderBlockLeaves.java +++ b/src/main/java/mods/betterfoliage/client/render/impl/RenderBlockLeaves.java @@ -76,28 +76,28 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b Double3 offset2 = pRot[(offsetVariation + 1) & 63].scaleAxes(Config.leavesHOffset, Config.leavesVOffset, Config.leavesHOffset); if (Config.leavesSkew) { - renderCrossedBlockQuadsSkew(ForgeDirection.UP, blockCenter, halfSize, offset1, offset2, leafInfo.roundLeafTexture, uvVariation, isAirTop, isAirBottom); + renderCrossedBlockQuadsSkew(ForgeDirection.UP, blockCenter, halfSize, offset1, offset2, leafInfo.roundLeafTexture, uvVariation); if (Config.leavesDense) { - renderCrossedBlockQuadsSkew(ForgeDirection.EAST, blockCenter, halfSize, offset1, offset2, leafInfo.roundLeafTexture, uvVariation, isAirTop, isAirBottom); - renderCrossedBlockQuadsSkew(ForgeDirection.SOUTH, blockCenter, halfSize, offset1, offset2, leafInfo.roundLeafTexture, uvVariation, isAirTop, isAirBottom); + renderCrossedBlockQuadsSkew(ForgeDirection.EAST, blockCenter, halfSize, offset1, offset2, leafInfo.roundLeafTexture, uvVariation); + renderCrossedBlockQuadsSkew(ForgeDirection.SOUTH, blockCenter, halfSize, offset1, offset2, leafInfo.roundLeafTexture, uvVariation); } if (isSnowTop) { // clear biome colors setShadingsGray(0.9f, aoYPXZNN, aoYPXZNP, aoYPXZPN, aoYPXZPP); Tessellator.instance.setColorOpaque(230, 230, 230); - renderCrossedBlockQuadsSkew(ForgeDirection.UP, blockCenter, halfSize, offset1, offset2, snowedLeavesIcons.get(uvVariation), 0, true, isAirBottom); + renderCrossedBlockQuadsSkew(ForgeDirection.UP, blockCenter, halfSize, offset1, offset2, snowedLeavesIcons.get(uvVariation), 0); } } else { - renderCrossedBlockQuadsTranslate(ForgeDirection.UP, blockCenter, halfSize, offset1, leafInfo.roundLeafTexture, uvVariation, isAirTop, isAirBottom); + renderCrossedBlockQuadsTranslate(ForgeDirection.UP, blockCenter, halfSize, offset1, leafInfo.roundLeafTexture, uvVariation); if (Config.leavesDense) { - renderCrossedBlockQuadsTranslate(ForgeDirection.EAST, blockCenter, halfSize, offset1, leafInfo.roundLeafTexture, uvVariation, isAirTop, isAirBottom); - renderCrossedBlockQuadsTranslate(ForgeDirection.SOUTH, blockCenter, halfSize, offset1, leafInfo.roundLeafTexture, uvVariation, isAirTop, isAirBottom); + renderCrossedBlockQuadsTranslate(ForgeDirection.EAST, blockCenter, halfSize, offset1, leafInfo.roundLeafTexture, uvVariation); + renderCrossedBlockQuadsTranslate(ForgeDirection.SOUTH, blockCenter, halfSize, offset1, leafInfo.roundLeafTexture, uvVariation); } if (isSnowTop) { // clear biome colors setShadingsGray(0.9f, aoYPXZNN, aoYPXZNP, aoYPXZPN, aoYPXZPP); Tessellator.instance.setColorOpaque(230, 230, 230); - renderCrossedBlockQuadsTranslate(ForgeDirection.UP, blockCenter, halfSize, offset1, snowedLeavesIcons.get(uvVariation), 0, true, isAirBottom); + renderCrossedBlockQuadsTranslate(ForgeDirection.UP, blockCenter, halfSize, offset1, snowedLeavesIcons.get(uvVariation), 0); } }