aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/render')
-rw-r--r--src/main/java/gregtech/common/render/GT_FlaskRenderer.java3
-rw-r--r--src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java3
-rw-r--r--src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java3
-rw-r--r--src/main/java/gregtech/common/render/GT_Renderer_Block.java39
-rw-r--r--src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java1
5 files changed, 46 insertions, 3 deletions
diff --git a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java
index 4917940340..7ba4d8e037 100644
--- a/src/main/java/gregtech/common/render/GT_FlaskRenderer.java
+++ b/src/main/java/gregtech/common/render/GT_FlaskRenderer.java
@@ -21,15 +21,18 @@ public final class GT_FlaskRenderer implements net.minecraftforge.client.IItemRe
MinecraftForgeClient.registerItemRenderer(ItemList.VOLUMETRIC_FLASK.getItem(), this);
}
+ @Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
return type != ItemRenderType.FIRST_PERSON_MAP;
}
+ @Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, IItemRenderer.ItemRendererHelper helper) {
return type == ItemRenderType.ENTITY;
}
+ @Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GT_VolumetricFlask cell = (GT_VolumetricFlask) item.getItem();
IIcon icon = item.getIconIndex();
diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java
index 92c57f6c93..6e4aadc938 100644
--- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java
+++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java
@@ -25,6 +25,7 @@ public class GT_MetaGenerated_Item_Renderer implements IItemRenderer {
}
}
+ @Override
public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) {
if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) {
return false;
@@ -32,6 +33,7 @@ public class GT_MetaGenerated_Item_Renderer implements IItemRenderer {
return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY);
}
+ @Override
public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) {
if (GT_Utility.isStackInvalid(aStack)) {
return false;
@@ -39,6 +41,7 @@ public class GT_MetaGenerated_Item_Renderer implements IItemRenderer {
return aType == IItemRenderer.ItemRenderType.ENTITY;
}
+ @Override
public void renderItem(IItemRenderer.ItemRenderType type, ItemStack aStack, Object... data) {
if (GT_Utility.isStackInvalid(aStack)) {
return;
diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java
index 70da5fe465..a57f97792c 100644
--- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java
+++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java
@@ -24,6 +24,7 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer {
}
}
+ @Override
public boolean handleRenderType(ItemStack aStack, IItemRenderer.ItemRenderType aType) {
if ((GT_Utility.isStackInvalid(aStack)) || (aStack.getItemDamage() < 0)) {
return false;
@@ -31,6 +32,7 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer {
return (aType == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) || (aType == IItemRenderer.ItemRenderType.INVENTORY) || (aType == IItemRenderer.ItemRenderType.EQUIPPED) || (aType == IItemRenderer.ItemRenderType.ENTITY);
}
+ @Override
public boolean shouldUseRenderHelper(IItemRenderer.ItemRenderType aType, ItemStack aStack, IItemRenderer.ItemRendererHelper aHelper) {
if (GT_Utility.isStackInvalid(aStack)) {
return false;
@@ -38,6 +40,7 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer {
return aType == IItemRenderer.ItemRenderType.ENTITY;
}
+ @Override
public void renderItem(IItemRenderer.ItemRenderType aType, ItemStack aStack, Object... data) {
if (GT_Utility.isStackInvalid(aStack)) {
return;
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
}
}
diff --git a/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java b/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java
index 27e3583a90..7feb8ce1b8 100644
--- a/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java
+++ b/src/main/java/gregtech/common/render/GT_Renderer_Entity_Arrow.java
@@ -13,6 +13,7 @@ public class GT_Renderer_Entity_Arrow extends RenderArrow {
RenderingRegistry.registerEntityRenderingHandler(aArrowClass, this);
}
+ @Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return this.mTexture;
}