diff options
author | syeyoung <cyong06@naver.com> | 2021-01-15 23:18:13 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-01-15 23:18:13 +0900 |
commit | 2f31ee747d693ed444334c84b4e2b112ef142531 (patch) | |
tree | 6d45305ca7547710081bf866970d6a320358d4b0 /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | 58040f039287bcbfcfb6a5bd06172820f0fa16cf (diff) | |
download | Skyblock-Dungeons-Guide-2f31ee747d693ed444334c84b4e2b112ef142531.tar.gz Skyblock-Dungeons-Guide-2f31ee747d693ed444334c84b4e2b112ef142531.tar.bz2 Skyblock-Dungeons-Guide-2f31ee747d693ed444334c84b4e2b112ef142531.zip |
facking glstatemanager
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
11 files changed, 52 insertions, 44 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java index 947b4dc7..f15b10b5 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java @@ -40,18 +40,18 @@ public abstract class GuiFeature extends AbstractFeature implements ScreenRender @Override public void drawScreen(float partialTicks) { if (!isEnabled()) return; - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GlStateManager.color(1,1,1,1); - GlStateManager.disableFog(); + GlStateManager.disableFog();GL11.glDisable(GL11.GL_FOG); GlStateManager.disableLighting(); clip(new ScaledResolution(Minecraft.getMinecraft()), featureRect.x, featureRect.y, featureRect.width, featureRect.height); GL11.glEnable(GL11.GL_SCISSOR_TEST); - GL11.glTranslated(featureRect.x, featureRect.y, 0); + GlStateManager.translate(featureRect.x, featureRect.y, 0); drawHUD(partialTicks); GL11.glDisable(GL11.GL_SCISSOR_TEST); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java index d3792e77..d98a3bbc 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureChestPrice.java @@ -83,8 +83,8 @@ public class FeatureChestPrice extends SimpleFeature implements GuiBackgroundRen int width = 120; - GL11.glPushMatrix(); - GL11.glTranslated(left, top, 0); + GlStateManager.pushMatrix(); + GlStateManager.translate(left, top, 0); Gui.drawRect( 0,0,width, 30, 0xFFDDDDDD); FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; @@ -96,6 +96,6 @@ public class FeatureChestPrice extends SimpleFeature implements GuiBackgroundRen str = (itemPrice > chestPrice ? "+" : "") +TextUtils.format(itemPrice - chestPrice); fr.drawString(str, width - fr.getStringWidth(str) - 5, 15, itemPrice > chestPrice ? 0xFF00CC00 : 0xFFCC0000); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java index 56ff4ce7..28fc7d0e 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java @@ -8,6 +8,7 @@ import kr.syeyoung.dungeonsguide.features.listener.DungeonQuitListener; import kr.syeyoung.dungeonsguide.features.listener.TickListener; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.GlStateManager; import org.lwjgl.opengl.GL11; import java.awt.*; @@ -25,7 +26,7 @@ public class FeatureCooldownCounter extends GuiFeature implements DungeonQuitLis if (System.currentTimeMillis() - leftDungeonTime > 20000) return; FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Cooldown: "+(20 - (System.currentTimeMillis() - leftDungeonTime) / 1000)+"s", 0,0,this.<Color>getParameter("color").getValue().getRGB()); } @@ -33,7 +34,7 @@ public class FeatureCooldownCounter extends GuiFeature implements DungeonQuitLis public void drawDemo(float partialTicks) { FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Cooldown: 20s", 0,0,this.<Color>getParameter("color").getValue().getRGB()); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java index 4dab2953..4210749c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java @@ -114,13 +114,13 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, MapData mapData = mapProcessor.getLastMapData2(); Gui.drawRect(0,0,getFeatureRect().width, getFeatureRect().height, this.<AColor>getParameter("background_color").getValue().getRGB()); GlStateManager.color(1,1,1,1); - GL11.glPushMatrix();; + GlStateManager.pushMatrix();; if (mapData == null) { Gui.drawRect(0,0,getFeatureRect().width, getFeatureRect().height, 0xFFFF0000); } else { renderMap(partialTicks,mapProcessor,mapData,context); } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); GL11.glLineWidth(2); RenderUtils.drawUnfilledBox(0,0,getFeatureRect().width, getFeatureRect().height, this.<AColor>getParameter("border_color").getValue().getRGB(), this.<Boolean>getParameter("chromaborder").getValue()); } @@ -142,19 +142,19 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, float postScale = this.<Boolean>getParameter("playerCenter").getValue() ? this.<Float>getParameter("postScale").getValue() : 1; int width = getFeatureRect().width; float scale = (this.<Boolean>getParameter("scale").getValue() ? width / 128.0f : 1); - GL11.glTranslated(width / 2, width / 2, 0); - GL11.glScaled(scale, scale, 0); - GL11.glScaled(postScale, postScale,0); + GlStateManager.translate(width / 2, width / 2, 0); + GlStateManager.scale(scale, scale, 0); + GlStateManager.scale(postScale, postScale,0); EntityPlayer p = Minecraft.getMinecraft().thePlayer; Point pt = mapProcessor.worldPointToMapPoint(p.getPositionEyes(partialTicks)); double yaw = p.prevRotationYawHead + (p.rotationYaw - p.prevRotationYawHead) * partialTicks; if (this.<Boolean>getParameter("playerCenter").getValue()) { if (this.<Boolean>getParameter("rotate").getValue()) { - GL11.glRotated((180 - yaw), 0,0,1); + GlStateManager.rotate((float) (180.0 - yaw), 0,0,1); } - GL11.glTranslated( -pt.x, -pt.y, 0); + GlStateManager.translate( -pt.x, -pt.y, 0); } else { - GL11.glTranslated( -64, -64, 0); + GlStateManager.translate( -64, -64, 0); } updateMapTexture(mapData.colors, mapProcessor, context.getDungeonRoomList()); render(mapData, false); @@ -191,7 +191,7 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, pt2 = new Point(vec.func_176112_b() /2 + 64, vec.func_176113_c() / 2 + 64); yaw2 = vec.func_176111_d() * 360 / 16.0f + 180; } - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); if (entityplayer == Minecraft.getMinecraft().thePlayer || this.<Boolean>getParameter("showotherplayers").getValue()) { boolean flag1 = entityplayer != null && entityplayer.isWearing(EnumPlayerModelParts.CAPE); @@ -200,32 +200,32 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, int l2 = 8 + (flag1 ? 8 : 0); int i3 = 8 * (flag1 ? -1 : 1); - GL11.glTranslated(pt2.x, pt2.y, 0); - GL11.glRotated(yaw2 - 180, 0, 0, 1); + GlStateManager.translate(pt2.x, pt2.y, 0); + GlStateManager.rotate((float) (yaw2 - 180), 0, 0, 1); - GL11.glScaled(1 / scale, 1 / scale, 0); - GL11.glScaled(1 / postScale, 1 / postScale, 0); + GlStateManager.scale(1 / scale, 1 / scale, 0); + GlStateManager.scale(1 / postScale, 1 / postScale, 0); float s = this.<Float>getParameter("playerheadscale").getValue(); - GL11.glScaled(s,s,0); + GlStateManager.scale(s,s,0); Gui.drawScaledCustomSizeModalRect(-4, -4, 8.0F, (float) l2, 8, i3, 8, 8, 64.0F, 64.0F); GL11.glLineWidth(1); RenderUtils.drawUnfilledBox(-4,-4,4, 4, this.<AColor>getParameter("player_color").getValue().getRGB(), this.<Boolean>getParameter("player_chroma").getValue()); } - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } FontRenderer fr = getFontRenderer(); if (this.<Boolean>getParameter("showtotalsecrets").getValue()) { for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) { - GL11.glPushMatrix(); + GlStateManager.pushMatrix(); GlStateManager.pushAttrib(); Point mapPt = mapProcessor.roomPointToMapPoint(dungeonRoom.getUnitPoints().get(0)); - GL11.glTranslated(mapPt.x + mapProcessor.getUnitRoomDimension().width / 2, mapPt.y + mapProcessor.getUnitRoomDimension().height / 2, 0); + GlStateManager.translate(mapPt.x + mapProcessor.getUnitRoomDimension().width / 2, mapPt.y + mapProcessor.getUnitRoomDimension().height / 2, 0); if (this.<Boolean>getParameter("playerCenter").getValue() && this.<Boolean>getParameter("rotate").getValue()) { - GL11.glRotated(yaw - 180, 0, 0, 1); + GlStateManager.rotate((float) (yaw - 180), 0, 0, 1); } - GL11.glScaled(1 / scale, 1 / scale, 0); - GL11.glScaled(1 / postScale, 1 / postScale, 0); + GlStateManager.scale(1 / scale, 1 / scale, 0); + GlStateManager.scale(1 / postScale, 1 / postScale, 0); String str = ""; str += dungeonRoom.getTotalSecrets() == -1 ? "?" : String.valueOf(dungeonRoom.getTotalSecrets()); str += " "; @@ -241,7 +241,7 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, fr.drawString(str, -(fr.getStringWidth(str) / 2), -(fr.FONT_HEIGHT / 2), dungeonRoom.getColor() == 74 ? 0xff000000 : 0xFFFFFFFF); GlStateManager.popAttrib(); - GL11.glPopMatrix(); + GlStateManager.popMatrix(); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMilestone.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMilestone.java index c8cff194..05956c3f 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMilestone.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMilestone.java @@ -12,6 +12,7 @@ import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.network.NetworkPlayerInfo; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.scoreboard.ScorePlayerTeam; import net.minecraft.util.ChatComponentText; import net.minecraftforge.client.event.ClientChatReceivedEvent; @@ -33,7 +34,7 @@ public class FeatureDungeonMilestone extends GuiFeature implements ChatListener if (!skyblockStatus.isOnDungeon()) return; FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); for (NetworkPlayerInfo networkPlayerInfoIn : Minecraft.getMinecraft().thePlayer.sendQueue.getPlayerInfoMap()) { String name = networkPlayerInfoIn.getDisplayName() != null ? networkPlayerInfoIn.getDisplayName().getFormattedText() : ScorePlayerTeam.formatPlayerName(networkPlayerInfoIn.getPlayerTeam(), networkPlayerInfoIn.getGameProfile().getName()); if (name.startsWith("§r Milestone: §r")) { @@ -49,7 +50,7 @@ public class FeatureDungeonMilestone extends GuiFeature implements ChatListener public void drawDemo(float partialTicks) { FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Milestone: 9", 0,0, this.<Color>getParameter("color").getValue().getRGB()); } public static final Pattern milestone_pattern = Pattern.compile("§r§e§l(.+) Milestone §r§e(.)§r§7: .+ §r§a(.+)§r"); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonRealTime.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonRealTime.java index eef21539..0efcd9b4 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonRealTime.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonRealTime.java @@ -10,6 +10,7 @@ import kr.syeyoung.dungeonsguide.features.listener.DungeonStartListener; import kr.syeyoung.dungeonsguide.features.listener.TickListener; import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraftforge.client.event.ClientChatReceivedEvent; import org.lwjgl.opengl.GL11; @@ -29,7 +30,7 @@ public class FeatureDungeonRealTime extends GuiFeature implements DungeonStartLi if (started == -1) return; FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Time(Real): "+TextUtils.formatTime(getTimeElapsed()), 0,0, this.<Color>getParameter("color").getValue().getRGB()); } @@ -41,7 +42,7 @@ public class FeatureDungeonRealTime extends GuiFeature implements DungeonStartLi public void drawDemo(float partialTicks) { FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Time(Real): -42h", 0,0, this.<Color>getParameter("color").getValue().getRGB()); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonSBTime.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonSBTime.java index 88236758..6cf8aa29 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonSBTime.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonSBTime.java @@ -9,6 +9,7 @@ import kr.syeyoung.dungeonsguide.features.listener.*; import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.scoreboard.Score; import net.minecraft.scoreboard.ScoreObjective; import net.minecraft.scoreboard.ScorePlayerTeam; @@ -33,7 +34,7 @@ public class FeatureDungeonSBTime extends GuiFeature { if (!skyblockStatus.isOnDungeon()) return; FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); Scoreboard scoreboard = Minecraft.getMinecraft().theWorld.getScoreboard(); ScoreObjective objective = scoreboard.getObjectiveInDisplaySlot(1); Collection<Score> scores = scoreboard.getSortedScores(objective); @@ -74,7 +75,7 @@ public class FeatureDungeonSBTime extends GuiFeature { public void drawDemo(float partialTicks) { FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Time(Ig): -42h", 0,0, this.<Color>getParameter("color").getValue().getRGB()); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java index 880efbaf..788f3207 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonScore.java @@ -10,6 +10,7 @@ import kr.syeyoung.dungeonsguide.features.GuiFeature; import lombok.AllArgsConstructor; import lombok.Data; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.MathHelper; import org.lwjgl.opengl.GL11; @@ -40,7 +41,7 @@ public class FeatureDungeonScore extends GuiFeature { fr.drawString(req, 0, 24, rgb); } else { double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); String letter = getLetter(sum); fr.drawString("Score: "+sum + "("+letter+")", 0,0, this.<Color>getParameter("color").getValue().getRGB()); } @@ -57,7 +58,7 @@ public class FeatureDungeonScore extends GuiFeature { fr.drawString("S->S+ (1 Required 1 tomb)", 0, 24, rgb); } else { double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Score: 305 (S+)", 0,0, this.<Color>getParameter("color").getValue().getRGB()); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonSecrets.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonSecrets.java index afe8da07..c82669db 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonSecrets.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonSecrets.java @@ -13,6 +13,7 @@ import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.network.NetworkPlayerInfo; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.scoreboard.ScorePlayerTeam; import net.minecraft.util.ChatComponentText; import net.minecraftforge.client.event.ClientChatReceivedEvent; @@ -34,7 +35,7 @@ public class FeatureDungeonSecrets extends GuiFeature { if (!skyblockStatus.isOnDungeon()) return; FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Secrets: "+getSecretsFound() +"/"+getTotalSecrets(), 0,0, this.<Color>getParameter("color").getValue().getRGB()); } @@ -42,7 +43,7 @@ public class FeatureDungeonSecrets extends GuiFeature { public void drawDemo(float partialTicks) { FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Secrets: 999/2+", 0,0, this.<Color>getParameter("color").getValue().getRGB()); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonTombs.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonTombs.java index 511e971f..681cfd55 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonTombs.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonTombs.java @@ -8,6 +8,7 @@ import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.network.NetworkPlayerInfo; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.scoreboard.ScorePlayerTeam; import org.lwjgl.opengl.GL11; @@ -26,7 +27,7 @@ public class FeatureDungeonTombs extends GuiFeature { if (!skyblockStatus.isOnDungeon()) return; FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Crypts: "+getTombsFound(), 0,0, this.<Color>getParameter("color").getValue().getRGB()); } @@ -34,7 +35,7 @@ public class FeatureDungeonTombs extends GuiFeature { public void drawDemo(float partialTicks) { FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("Crypts: 42", 0,0, this.<Color>getParameter("color").getValue().getRGB()); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java index ab3a727d..5c426292 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureWarnLowHealth.java @@ -11,6 +11,7 @@ import kr.syeyoung.dungeonsguide.utils.RenderUtils; import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.scoreboard.Score; import net.minecraft.scoreboard.ScoreObjective; @@ -39,7 +40,7 @@ public class FeatureWarnLowHealth extends GuiFeature { public void drawDemo(float partialTicks) { FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); fr.drawString("DungeonsGuide: ", 0,0,this.<Color>getParameter("color").getValue().getRGB()); fr.drawString("500hp", fr.getStringWidth("DungeonsGuide: "), 0, Color.red.getRGB()); } @@ -48,7 +49,7 @@ public class FeatureWarnLowHealth extends GuiFeature { public void drawHUD(float partialTicks) { FontRenderer fr = getFontRenderer(); double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT; - GL11.glScaled(scale, scale, 0); + GlStateManager.scale(scale, scale, 0); String lowestHealthName = ""; int lowestHealth = 999999999; Scoreboard scoreboard = Minecraft.getMinecraft().thePlayer.getWorldScoreboard(); |