diff options
author | GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> | 2023-01-01 02:11:17 +0000 |
---|---|---|
committer | GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> | 2023-01-01 02:11:17 +0000 |
commit | 8a7b349e5d0e797ebd8178e51004c7b9b3cb4ca7 (patch) | |
tree | 577c654091461acc38921231f175bbb5940f735d /src | |
parent | 27c54cce2ce9f01303266f7eecdffd074a28d2d1 (diff) | |
download | GT5-Unofficial-8a7b349e5d0e797ebd8178e51004c7b9b3cb4ca7.tar.gz GT5-Unofficial-8a7b349e5d0e797ebd8178e51004c7b9b3cb4ca7.tar.bz2 GT5-Unofficial-8a7b349e5d0e797ebd8178e51004c7b9b3cb4ca7.zip |
Working SIDE 2 on block renderer
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java | 114 |
1 files changed, 64 insertions, 50 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java index 41b28d0245..3f32a31784 100644 --- a/src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java +++ b/src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java @@ -221,22 +221,29 @@ public class RenderEyeOfHarmony extends TileEntitySpecialRenderer { tes.startDrawingQuads(); - IIcon texture = block.getIcon(4, meta); + IIcon texture; - double minU = texture.getMinU(); - double maxU = texture.getMaxU(); - double minV = texture.getMinV(); - double maxV = texture.getMaxV(); - - tes.addVertexWithUV(X[7], Y[7], Z[7], maxU, maxV); - tes.addVertexWithUV(X[6], Y[6], Z[6], maxU, minV); - tes.addVertexWithUV(X[1], Y[1], Z[1], minU, minV); - tes.addVertexWithUV(X[0], Y[0], Z[0], minU, maxV); + double minU; + double maxU; + double minV; + double maxV; { - GL11.glPushMatrix(); -// GL11.glRotatef(90, 0, 1, 0); + texture = block.getIcon(4, meta); + + minU = texture.getMinU(); + maxU = texture.getMaxU(); + minV = texture.getMinV(); + maxV = texture.getMaxV(); + tes.addVertexWithUV(X[7], Y[7], Z[7], maxU, maxV); + tes.addVertexWithUV(X[6], Y[6], Z[6], maxU, minV); + tes.addVertexWithUV(X[1], Y[1], Z[1], minU, minV); + tes.addVertexWithUV(X[0], Y[0], Z[0], minU, maxV); + } + + { + // Bottom face. texture = block.getIcon(0, meta); minU = texture.getMinU(); @@ -248,56 +255,63 @@ public class RenderEyeOfHarmony extends TileEntitySpecialRenderer { tes.addVertexWithUV(X[5], Y[5], Z[5], maxU, minV); tes.addVertexWithUV(X[6], Y[6], Z[6], minU, minV); tes.addVertexWithUV(X[1], Y[1], Z[1], minU, maxV); - - GL11.glPopMatrix(); } - texture = block.getIcon(2, meta); - minU = texture.getMinU(); - maxU = texture.getMaxU(); - minV = texture.getMinV(); - maxV = texture.getMaxV(); + { + texture = block.getIcon(2, meta); - tes.addVertexWithUV(X[4], Y[4], Z[4], maxU, maxV); - tes.addVertexWithUV(X[5], Y[5], Z[5], maxU, minV); - tes.addVertexWithUV(X[6], Y[6], Z[6], minU, minV); - tes.addVertexWithUV(X[7], Y[7], Z[7], minU, maxV); + minU = texture.getMinU(); + maxU = texture.getMaxU(); + minV = texture.getMinV(); + maxV = texture.getMaxV(); - texture = block.getIcon(3, meta); + tes.addVertexWithUV(X[6], Y[6], Z[6], maxU, maxV); + tes.addVertexWithUV(X[7], Y[7], Z[7], maxU, minV); + tes.addVertexWithUV(X[4], Y[4], Z[4], minU, minV); + tes.addVertexWithUV(X[5], Y[5], Z[5], minU, maxV); + } - minU = texture.getMinU(); - maxU = texture.getMaxU(); - minV = texture.getMinV(); - maxV = texture.getMaxV(); + { + texture = block.getIcon(3, meta); - tes.addVertexWithUV(X[3], Y[3], Z[3], maxU, maxV); - tes.addVertexWithUV(X[2], Y[2], Z[2], maxU, minV); - tes.addVertexWithUV(X[5], Y[5], Z[5], minU, minV); - tes.addVertexWithUV(X[4], Y[4], Z[4], minU, maxV); + minU = texture.getMinU(); + maxU = texture.getMaxU(); + minV = texture.getMinV(); + maxV = texture.getMaxV(); - texture = block.getIcon(1, meta); + tes.addVertexWithUV(X[3], Y[3], Z[3], maxU, maxV); + tes.addVertexWithUV(X[2], Y[2], Z[2], maxU, minV); + tes.addVertexWithUV(X[5], Y[5], Z[5], minU, minV); + tes.addVertexWithUV(X[4], Y[4], Z[4], minU, maxV); + } - minU = texture.getMinU(); - maxU = texture.getMaxU(); - minV = texture.getMinV(); - maxV = texture.getMaxV(); + { + texture = block.getIcon(1, meta); + + minU = texture.getMinU(); + maxU = texture.getMaxU(); + minV = texture.getMinV(); + maxV = texture.getMaxV(); - tes.addVertexWithUV(X[7], Y[7], Z[7], maxU, maxV); - tes.addVertexWithUV(X[0], Y[0], Z[0], maxU, minV); - tes.addVertexWithUV(X[3], Y[3], Z[3], minU, minV); - tes.addVertexWithUV(X[4], Y[4], Z[4], minU, maxV); + tes.addVertexWithUV(X[7], Y[7], Z[7], maxU, maxV); + tes.addVertexWithUV(X[0], Y[0], Z[0], maxU, minV); + tes.addVertexWithUV(X[3], Y[3], Z[3], minU, minV); + tes.addVertexWithUV(X[4], Y[4], Z[4], minU, maxV); + } - texture = block.getIcon(5, meta); + { + texture = block.getIcon(5, meta); - minU = texture.getMinU(); - maxU = texture.getMaxU(); - minV = texture.getMinV(); - maxV = texture.getMaxV(); + minU = texture.getMinU(); + maxU = texture.getMaxU(); + minV = texture.getMinV(); + maxV = texture.getMaxV(); - tes.addVertexWithUV(X[0], Y[0], Z[0], maxU, maxV); - tes.addVertexWithUV(X[1], Y[1], Z[1], maxU, minV); - tes.addVertexWithUV(X[2], Y[2], Z[2], minU, minV); - tes.addVertexWithUV(X[3], Y[3], Z[3], minU, maxV); + tes.addVertexWithUV(X[0], Y[0], Z[0], maxU, maxV); + tes.addVertexWithUV(X[1], Y[1], Z[1], maxU, minV); + tes.addVertexWithUV(X[2], Y[2], Z[2], minU, minV); + tes.addVertexWithUV(X[3], Y[3], Z[3], minU, maxV); + } tes.draw(); |