From 7ae35e05a9c9e2c5545878542f3f9459468ba29f Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 17 Nov 2016 18:03:37 +0100 Subject: [PATCH] Made picture pages not suck --- .../actuallyadditions/mod/booklet/page/PagePicture.java | 8 ++++++++ .../actuallyadditions/mod/inventory/gui/FluidDisplay.java | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java index 87e41403f..dba0f8506 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/page/PagePicture.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.booklet.page; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.config.GuiUtils; @@ -35,7 +36,14 @@ public class PagePicture extends BookletPage{ super.drawScreenPre(gui, startX, startY, mouseX, mouseY, partialTicks); gui.mc.getTextureManager().bindTexture(this.resLoc); + + GlStateManager.pushMatrix(); + GlStateManager.enableBlend(); + GlStateManager.disableAlpha(); GuiUtils.drawTexturedModalRect(startX-6, startY-7, 0, 0, 256, 256, 0); + GlStateManager.disableBlend(); + GlStateManager.enableAlpha(); + GlStateManager.popMatrix(); PageTextOnly.renderTextToPage(gui, this, startX+6, startY-7+this.yTextOffset); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java index fad6f0215..ad858194a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java @@ -82,6 +82,7 @@ public class FluidDisplay extends Gui{ if(stack != null && fluid != null && this.resLoc != null){ mc.getTextureManager().bindTexture(this.resLoc); + GlStateManager.pushMatrix(); GlStateManager.enableBlend(); GlStateManager.disableAlpha(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); @@ -89,6 +90,7 @@ public class FluidDisplay extends Gui{ GuiInputter.drawModalRectWithCustomSizedTexture(barX+1, barY+84-i, 36, 172, 16, i, 16, 512); GlStateManager.disableBlend(); GlStateManager.enableAlpha(); + GlStateManager.popMatrix(); } if(this.drawTextNextTo){