Skip to content

Commit

Permalink
Fix #328 Render fluids in tanks using alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Jun 27, 2016
1 parent 56029e6 commit c670ad1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -5,4 +5,4 @@ curse_project_id=238222

version_major=3
version_minor=7
version_patch=0
version_patch=1
13 changes: 6 additions & 7 deletions src/main/java/mezz/jei/gui/ingredients/FluidStackRenderer.java
Expand Up @@ -48,23 +48,22 @@ public void setIngredients(@Nonnull Collection<FluidStack> ingredients) {

@Override
public void draw(@Nonnull Minecraft minecraft, final int xPosition, final int yPosition, @Nullable FluidStack fluidStack) {
GlStateManager.disableBlend();
GlStateManager.enableBlend();
GlStateManager.enableAlpha();

drawFluid(minecraft, xPosition, yPosition, fluidStack);

GlStateManager.color(1, 1, 1, 1);

if (overlay != null) {
GlStateManager.enableAlpha();
GlStateManager.enableBlend();

GlStateManager.pushMatrix();
GlStateManager.translate(0, 0, 200);
overlay.draw(minecraft, xPosition, yPosition);
GlStateManager.popMatrix();

GlStateManager.disableBlend();
GlStateManager.disableAlpha();
}

GlStateManager.disableAlpha();
GlStateManager.disableBlend();
}

private void drawFluid(@Nonnull Minecraft minecraft, final int xPosition, final int yPosition, @Nullable FluidStack fluidStack) {
Expand Down

0 comments on commit c670ad1

Please sign in to comment.