Reduce redundant code in pipe world renderer

This commit is contained in:
CovertJaguar 2013-08-09 01:30:03 -07:00
parent 7c8104c682
commit 0ae4035dab

View file

@ -80,12 +80,12 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
} }
private void renderAllFaceExeptAxe(RenderBlocks renderblocks, Block block, Icon icon, int x, int y, int z, char axe) { private void renderAllFaceExeptAxe(RenderBlocks renderblocks, Block block, Icon icon, int x, int y, int z, char axe) {
float minX = (float) block.getBlockBoundsMinX(); float minX = (float) renderblocks.renderMinX;
float minY = (float) block.getBlockBoundsMinY(); float minY = (float) renderblocks.renderMinY;
float minZ = (float) block.getBlockBoundsMinZ(); float minZ = (float) renderblocks.renderMinZ;
float maxX = (float) block.getBlockBoundsMaxX(); float maxX = (float) renderblocks.renderMaxX;
float maxY = (float) block.getBlockBoundsMaxY(); float maxY = (float) renderblocks.renderMaxY;
float maxZ = (float) block.getBlockBoundsMaxZ(); float maxZ = (float) renderblocks.renderMaxZ;
if (axe != 'x') { if (axe != 'x') {
renderTwoWayXFace(renderblocks, block, icon, x, y, z, minY, minZ, maxY, maxZ, minX); renderTwoWayXFace(renderblocks, block, icon, x, y, z, minY, minZ, maxY, maxZ, minX);
renderTwoWayXFace(renderblocks, block, icon, x, y, z, minY, minZ, maxY, maxZ, maxX); renderTwoWayXFace(renderblocks, block, icon, x, y, z, minY, minZ, maxY, maxZ, maxX);
@ -101,20 +101,17 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
} }
private void renderTwoWayXFace(RenderBlocks renderblocks, Block block, Icon icon, int xCoord, int yCoord, int zCoord, float minY, float minZ, float maxY, float maxZ, float x) { private void renderTwoWayXFace(RenderBlocks renderblocks, Block block, Icon icon, int xCoord, int yCoord, int zCoord, float minY, float minZ, float maxY, float maxZ, float x) {
block.setBlockBounds(x, minY, minZ, x, maxY, maxZ); renderblocks.setRenderBounds(x, minY, minZ, x, maxY, maxZ);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, xCoord, yCoord, zCoord); renderblocks.renderStandardBlock(block, xCoord, yCoord, zCoord);
} }
private void renderTwoWayYFace(RenderBlocks renderblocks, Block block, Icon icon, int xCoord, int yCoord, int zCoord, float minX, float minZ, float maxX, float maxZ, float y) { private void renderTwoWayYFace(RenderBlocks renderblocks, Block block, Icon icon, int xCoord, int yCoord, int zCoord, float minX, float minZ, float maxX, float maxZ, float y) {
block.setBlockBounds(minX, y, minZ, maxX, y, maxZ); renderblocks.setRenderBounds(minX, y, minZ, maxX, y, maxZ);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, xCoord, yCoord, zCoord); renderblocks.renderStandardBlock(block, xCoord, yCoord, zCoord);
} }
private void renderTwoWayZFace(RenderBlocks renderblocks, Block block, Icon icon, int xCoord, int yCoord, int zCoord, float minX, float minY, float maxX, float maxY, float z) { private void renderTwoWayZFace(RenderBlocks renderblocks, Block block, Icon icon, int xCoord, int yCoord, int zCoord, float minX, float minY, float maxX, float maxY, float z) {
block.setBlockBounds(minX, minY, z, maxX, maxY, z); renderblocks.setRenderBounds(minX, minY, z, maxX, maxY, z);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, xCoord, yCoord, zCoord); renderblocks.renderStandardBlock(block, xCoord, yCoord, zCoord);
} }
@ -137,55 +134,48 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST)) { if (state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST)) {
state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.WEST)); state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.WEST));
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize); renderblocks.setRenderBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
renderblocks.setRenderBoundsFromBlock(block);
renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'x'); renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'x');
west = true; west = true;
} }
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST)) { if (state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST)) {
state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.EAST)); state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.EAST));
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize); renderblocks.setRenderBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
renderblocks.setRenderBoundsFromBlock(block);
renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'x'); renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'x');
east = true; east = true;
} }
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN)) { if (state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN)) {
state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.DOWN)); state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.DOWN));
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize); renderblocks.setRenderBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
renderblocks.setRenderBoundsFromBlock(block);
renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'y'); renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'y');
down = true; down = true;
} }
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.UP)) { if (state.pipeConnectionMatrix.isConnected(ForgeDirection.UP)) {
state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.UP)); state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.UP));
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize); renderblocks.setRenderBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
renderblocks.setRenderBoundsFromBlock(block);
renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'y'); renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'y');
up = true; up = true;
} }
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH)) { if (state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH)) {
state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.NORTH)); state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.NORTH));
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize); renderblocks.setRenderBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
renderblocks.setRenderBoundsFromBlock(block);
renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'z'); renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'z');
north = true; north = true;
} }
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH)) { if (state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH)) {
state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.SOUTH)); state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.SOUTH));
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F); renderblocks.setRenderBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
renderblocks.setRenderBoundsFromBlock(block);
renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'z'); renderAllFaceExeptAxe(renderblocks, block, state.currentTexture, x, y, z, 'z');
south = true; south = true;
} }
state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN)); state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN));
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize); renderblocks.setRenderBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
renderblocks.setRenderBoundsFromBlock(block);
if (!west) if (!west)
renderTwoWayXFace(renderblocks, block, state.currentTexture, x, y, z, minSize, minSize, maxSize, maxSize, minSize); renderTwoWayXFace(renderblocks, block, state.currentTexture, x, y, z, minSize, minSize, maxSize, maxSize, minSize);
if (!east) if (!east)
@ -199,7 +189,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
if (!south) if (!south)
renderTwoWayZFace(renderblocks, block, state.currentTexture, x, y, z, minSize, minSize, maxSize, maxSize, maxSize); renderTwoWayZFace(renderblocks, block, state.currentTexture, x, y, z, minSize, minSize, maxSize, maxSize, maxSize);
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); renderblocks.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
if (state.wireMatrix.hasWire(WireColor.Red)) { if (state.wireMatrix.hasWire(WireColor.Red)) {
state.currentTexture = BuildCraftTransport.instance.wireIconProvider.getIcon(state.wireMatrix.getWireIconIndex(WireColor.Red)); state.currentTexture = BuildCraftTransport.instance.wireIconProvider.getIcon(state.wireMatrix.getWireIconIndex(WireColor.Red));
@ -277,16 +267,14 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
rotated[2][1] = Utils.pipeMinPos; rotated[2][1] = Utils.pipeMinPos;
rotated[1][0] -= zFightOffset / 2; rotated[1][0] -= zFightOffset / 2;
transform(rotated, direction); transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); renderblocks.setRenderBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
rotated = deepClone(zeroState); rotated = deepClone(zeroState);
rotated[2][0] = Utils.pipeMaxPos; rotated[2][0] = Utils.pipeMaxPos;
rotated[1][0] -= zFightOffset / 2; rotated[1][0] -= zFightOffset / 2;
transform(rotated, direction); transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); renderblocks.setRenderBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
rotated = deepClone(zeroState); rotated = deepClone(zeroState);
@ -294,8 +282,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
rotated[0][1] = Utils.pipeMinPos; rotated[0][1] = Utils.pipeMinPos;
rotated[1][1] -= zFightOffset; rotated[1][1] -= zFightOffset;
transform(rotated, direction); transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); renderblocks.setRenderBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
rotated = deepClone(zeroState); rotated = deepClone(zeroState);
@ -303,14 +290,12 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
rotated[0][1] = 1F; rotated[0][1] = 1F;
rotated[1][1] -= zFightOffset; rotated[1][1] -= zFightOffset;
transform(rotated, direction); transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); renderblocks.setRenderBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} else { // Solid facade } else { // Solid facade
float[][] rotated = deepClone(zeroState); float[][] rotated = deepClone(zeroState);
transform(rotated, direction); transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); renderblocks.setRenderBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
@ -344,8 +329,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
float[][] rotated = deepClone(zeroState); float[][] rotated = deepClone(zeroState);
transform(rotated, direction); transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); renderblocks.setRenderBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
} }
@ -373,8 +357,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
float[][] rotated = deepClone(zeroState); float[][] rotated = deepClone(zeroState);
transform(rotated, direction); transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); renderblocks.setRenderBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
} }
@ -396,8 +379,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
float[][] rotated = deepClone(zeroState); float[][] rotated = deepClone(zeroState);
transform(rotated, direction); transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); renderblocks.setRenderBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
} }
@ -496,34 +478,30 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
// Z render // Z render
if (minZ != Utils.pipeMinPos || maxZ != Utils.pipeMaxPos || !found) { if (minZ != Utils.pipeMinPos || maxZ != Utils.pipeMaxPos || !found) {
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, minZ, cx == Utils.pipeMinPos ? cx renderblocks.setRenderBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, minZ, cx == Utils.pipeMinPos ? cx
: cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, maxZ); : cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, maxZ);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
// X render // X render
if (minX != Utils.pipeMinPos || maxX != Utils.pipeMaxPos || !found) { if (minX != Utils.pipeMinPos || maxX != Utils.pipeMaxPos || !found) {
block.setBlockBounds(minX, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz, maxX, cy == Utils.pipeMinPos ? cy renderblocks.setRenderBounds(minX, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz, maxX, cy == Utils.pipeMinPos ? cy
: cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F); : cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
// Y render // Y render
if (minY != Utils.pipeMinPos || maxY != Utils.pipeMaxPos || !found) { if (minY != Utils.pipeMinPos || maxY != Utils.pipeMaxPos || !found) {
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, minY, cz == Utils.pipeMinPos ? cz - 0.05F : cz, cx == Utils.pipeMinPos ? cx renderblocks.setRenderBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, minY, cz == Utils.pipeMinPos ? cz - 0.05F : cz, cx == Utils.pipeMinPos ? cx
: cx + 0.05F, maxY, cz == Utils.pipeMinPos ? cz : cz + 0.05F); : cx + 0.05F, maxY, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
if (center || !found) { if (center || !found) {
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz, renderblocks.setRenderBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz,
cx == Utils.pipeMinPos ? cx : cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F); cx == Utils.pipeMinPos ? cx : cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
@ -537,38 +515,32 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
float max = Utils.pipeMaxPos - 0.05F; float max = Utils.pipeMaxPos - 0.05F;
if (shouldRenderNormalPipeSide(state, ForgeDirection.WEST)) { if (shouldRenderNormalPipeSide(state, ForgeDirection.WEST)) {
block.setBlockBounds(Utils.pipeMinPos - 0.10F, min, min, Utils.pipeMinPos + 0.001F, max, max); renderblocks.setRenderBounds(Utils.pipeMinPos - 0.10F, min, min, Utils.pipeMinPos + 0.001F, max, max);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
if (shouldRenderNormalPipeSide(state, ForgeDirection.EAST)) { if (shouldRenderNormalPipeSide(state, ForgeDirection.EAST)) {
block.setBlockBounds(Utils.pipeMaxPos + 0.001F, min, min, Utils.pipeMaxPos + 0.10F, max, max); renderblocks.setRenderBounds(Utils.pipeMaxPos + 0.001F, min, min, Utils.pipeMaxPos + 0.10F, max, max);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
if (shouldRenderNormalPipeSide(state, ForgeDirection.DOWN)) { if (shouldRenderNormalPipeSide(state, ForgeDirection.DOWN)) {
block.setBlockBounds(min, Utils.pipeMinPos - 0.10F, min, max, Utils.pipeMinPos + 0.001F, max); renderblocks.setRenderBounds(min, Utils.pipeMinPos - 0.10F, min, max, Utils.pipeMinPos + 0.001F, max);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
if (shouldRenderNormalPipeSide(state, ForgeDirection.UP)) { if (shouldRenderNormalPipeSide(state, ForgeDirection.UP)) {
block.setBlockBounds(min, Utils.pipeMaxPos + 0.001F, min, max, Utils.pipeMaxPos + 0.10F, max); renderblocks.setRenderBounds(min, Utils.pipeMaxPos + 0.001F, min, max, Utils.pipeMaxPos + 0.10F, max);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
if (shouldRenderNormalPipeSide(state, ForgeDirection.NORTH)) { if (shouldRenderNormalPipeSide(state, ForgeDirection.NORTH)) {
block.setBlockBounds(min, min, Utils.pipeMinPos - 0.10F, max, max, Utils.pipeMinPos + 0.001F); renderblocks.setRenderBounds(min, min, Utils.pipeMinPos - 0.10F, max, max, Utils.pipeMinPos + 0.001F);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
if (shouldRenderNormalPipeSide(state, ForgeDirection.SOUTH)) { if (shouldRenderNormalPipeSide(state, ForgeDirection.SOUTH)) {
block.setBlockBounds(min, min, Utils.pipeMaxPos + 0.001F, max, max, Utils.pipeMaxPos + 0.10F); renderblocks.setRenderBounds(min, min, Utils.pipeMaxPos + 0.001F, max, max, Utils.pipeMaxPos + 0.10F);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z); renderblocks.renderStandardBlock(block, x, y, z);
} }
} }