From c7543c833f9bf57c79f8f58c5c91beacb5d986f9 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sun, 9 May 2021 13:54:52 +0900 Subject: FIX TEXT FLASHING. BLEND GO BRRRRR --- .../dungeonsguide/features/impl/boss/FeatureChestPrice.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java index f6c61608..da907df0 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java @@ -34,6 +34,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraftforge.client.event.GuiScreenEvent; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL14; import java.util.Comparator; import java.util.Set; @@ -101,6 +103,10 @@ public class FeatureChestPrice extends SimpleFeature implements GuiBackgroundRen GlStateManager.translate(left, top, 0); Gui.drawRect( 0,0,width, 30, 0xFFDDDDDD); + + GlStateManager.enableBlend(); + GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); + GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; fr.drawString("BIN/AH Price: ", 5,5, 0xFF000000); String str = TextUtils.format(itemPrice); -- cgit