Skip to content

Commit

Permalink
Fixed pipes in inventory losing transparency in various situations
Browse files Browse the repository at this point in the history
  • Loading branch information
dmillerw committed Apr 10, 2014
1 parent 1945458 commit aff0b01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/buildcraft/transport/render/PipeItemRenderer.java
Expand Up @@ -12,6 +12,7 @@
import buildcraft.core.CoreConstants;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureMap;
Expand All @@ -23,6 +24,9 @@
public class PipeItemRenderer implements IItemRenderer {

private void renderPipeItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) {
// Simply force transparency
OpenGlHelper.glBlendFunc(770, 771, 0, 1);
GL11.glEnable(GL11.GL_BLEND);

// GL11.glBindTexture(GL11.GL_TEXTURE_2D, 10);
Tessellator tessellator = Tessellator.instance;
Expand Down Expand Up @@ -64,6 +68,9 @@ private void renderPipeItem(RenderBlocks render, ItemStack item, float translate
tessellator.draw();
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);

// Cleanup
GL11.glDisable(GL11.GL_BLEND);
}

/**
Expand Down

0 comments on commit aff0b01

Please sign in to comment.