fixed rendering problems, merged from 6.0.x, close #1934

This commit is contained in:
SpaceToad 2014-07-11 08:43:49 +02:00
parent 368cdb234e
commit 4144188467
2 changed files with 8 additions and 0 deletions

View file

@ -152,6 +152,7 @@ public class GateItemRenderer implements IItemRenderer {
private void render(ItemRenderType type, ItemStack stack) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_ALPHA_TEST); // In certain cases gets disabled by this point
IIcon icon = ItemGate.getLogic(stack).getIconItem();
renderItem.renderIcon(0, 0, icon, 16, 16);

View file

@ -24,6 +24,11 @@ public class PipeItemRenderer implements IItemRenderer {
private void renderPipeItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) {
GL11.glPushAttrib(GL11.GL_COLOR_BUFFER_BIT); //don't break other mods' guis when holding a pipe
//force transparency
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(GL11.GL_BLEND);
// GL11.glBindTexture(GL11.GL_TEXTURE_2D, 10);
Tessellator tessellator = Tessellator.instance;
@ -64,6 +69,8 @@ public class PipeItemRenderer implements IItemRenderer {
tessellator.draw();
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
GL11.glPopAttrib(); //nicely leave the rendering how it was
}
/**