mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
T and X junctions now render posts too
This commit is contained in:
parent
27cf5ca091
commit
811a1b92c1
@ -26,15 +26,15 @@ public class RenderFence implements ISimpleBlockRenderingHandler {
|
|||||||
boolean zNeg = fence.canConnectFenceTo(world, x, y, z - 1);
|
boolean zNeg = fence.canConnectFenceTo(world, x, y, z - 1);
|
||||||
boolean zPos = fence.canConnectFenceTo(world, x, y, z + 1);
|
boolean zPos = fence.canConnectFenceTo(world, x, y, z + 1);
|
||||||
|
|
||||||
boolean flag1 = xNeg || xPos;
|
boolean hasX = xNeg || xPos;
|
||||||
boolean flag2 = zNeg || zPos;
|
boolean hasZ = zNeg || zPos;
|
||||||
|
|
||||||
boolean straightX = xNeg && xPos;
|
boolean straightX = !hasZ && xNeg && xPos;
|
||||||
boolean straightZ = zNeg && zPos;
|
boolean straightZ = !hasX && zNeg && zPos;
|
||||||
boolean showPost = meta == 1 || (!straightX && !straightZ);
|
boolean showPost = meta == 1 || (!straightX && !straightZ);
|
||||||
|
|
||||||
if (!flag1 && !flag2) {
|
if (!hasX && !hasZ) {
|
||||||
flag1 = true;
|
hasX = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
float f = 0.4375F;
|
float f = 0.4375F;
|
||||||
@ -45,12 +45,12 @@ public class RenderFence implements ISimpleBlockRenderingHandler {
|
|||||||
float f7 = zPos ? 1.0F : f1;
|
float f7 = zPos ? 1.0F : f1;
|
||||||
renderer.field_152631_f = true;
|
renderer.field_152631_f = true;
|
||||||
|
|
||||||
if (flag1) {
|
if (hasX) {
|
||||||
renderer.setRenderBounds((double)f4, (double)0, (double)0.5, (double)f5, (double)1, (double)0.5);
|
renderer.setRenderBounds((double)f4, (double)0, (double)0.5, (double)f5, (double)1, (double)0.5);
|
||||||
renderer.renderStandardBlock(fence, x, y, z);
|
renderer.renderStandardBlock(fence, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag2) {
|
if (hasZ) {
|
||||||
renderer.setRenderBounds((double)0.5, (double)0, (double)f6, (double)0.5, (double)1, (double)f7);
|
renderer.setRenderBounds((double)0.5, (double)0, (double)f6, (double)0.5, (double)1, (double)f7);
|
||||||
renderer.renderStandardBlock(fence, x, y, z);
|
renderer.renderStandardBlock(fence, x, y, z);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user