aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorLéa Gris <lea.gris@noiraude.net>2021-05-23 16:42:33 +0200
committerLéa Gris <lea.gris@noiraude.net>2021-05-24 11:47:10 +0200
commit17ae09fb138b8f73fc28355130d16b363a1c05d7 (patch)
tree98bd32e8b2f269252241a50fe958de47c8be40e8 /src/main/java
parentc39086946112174b81612e7fd96a2ce0ad056620 (diff)
downloadGT5-Unofficial-17ae09fb138b8f73fc28355130d16b363a1c05d7.tar.gz
GT5-Unofficial-17ae09fb138b8f73fc28355130d16b363a1c05d7.tar.bz2
GT5-Unofficial-17ae09fb138b8f73fc28355130d16b363a1c05d7.zip
fix(render): grass block top grey in inventory
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/common/render/GT_Renderer_Block.java39
1 files changed, 36 insertions, 3 deletions
diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Block.java b/src/main/java/gregtech/common/render/GT_Renderer_Block.java
index 42e59dd2c7..a9eafd7854 100644
--- a/src/main/java/gregtech/common/render/GT_Renderer_Block.java
+++ b/src/main/java/gregtech/common/render/GT_Renderer_Block.java
@@ -453,8 +453,6 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
aRenderer.enableAO = false;
aRenderer.useInventoryTint = true;
- Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
-
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
@@ -464,18 +462,30 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
aBlock.setBlockBoundsForItemRender();
aRenderer.setRenderBoundsFromBlock(aBlock);
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) DOWN.ordinal()), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) UP.ordinal()), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) NORTH.ordinal()), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) SOUTH.ordinal()), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) WEST.ordinal()), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) EAST.ordinal()), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
} else if (aMeta > 0
&& (aMeta < GregTech_API.METATILEENTITIES.length)
@@ -488,7 +498,6 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
aBlock.setBlockBounds(blockMin, blockMin, blockMin, blockMax, blockMax, blockMax);
aRenderer.setRenderBoundsFromBlock(aBlock);
- Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
aRenderer.useInventoryTint = false;
}
@@ -513,31 +522,55 @@ public class GT_Renderer_Block implements ISimpleBlockRenderingHandler {
aBlock.setBlockBounds(blockMin, pipeMin, pipeMin, blockMax, pipeMax, pipeMax);
aRenderer.setRenderBoundsFromBlock(aBlock);
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) UP.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, false, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) WEST.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, true, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) EAST.ordinal(), (byte) (CONNECTED_WEST | CONNECTED_EAST), (byte) -1, true, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
} else {
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, -1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) DOWN.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 1, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) UP.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 0, -1); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) NORTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(0, 0, 1); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) SOUTH.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(-1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) WEST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
+ Tessellator.instance.startDrawingQuads(); // TODO: Remove this once all addons have migrated to the new Texture API
Tessellator.instance.setNormal(1, 0, 0); // TODO: Remove this once all addons have migrated to the new Texture API
renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tMetaTileEntity.getTexture(iGregTechTileEntity, (byte) EAST.ordinal(), (byte) WEST.ordinal(), (byte) -1, true, false), true);
+ Tessellator.instance.draw(); // TODO: Remove this once all addons have migrated to the new Texture API
}
}