From b0524098c6e6ae399fff7b94f8423e2f0d1b9567 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 27 Feb 2021 02:02:38 +0900 Subject: bruh --- .../features/impl/dungeon/FeatureDungeonMap.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java index 2f958169..a14b9c99 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java @@ -110,17 +110,18 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, DungeonContext context = skyblockStatus.getContext(); MapProcessor mapProcessor = context.getMapProcessor(); MapData mapData = mapProcessor.getLastMapData2(); - Gui.drawRect(0,0,getFeatureRect().width, getFeatureRect().height, RenderUtils.getColorAt(getFeatureRect().x, getFeatureRect().y, this.getParameter("background_color").getValue())); + Rectangle featureRect =getFeatureRect().getRectangle(); + Gui.drawRect(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.getParameter("background_color").getValue())); GlStateManager.color(1,1,1,1); GlStateManager.pushMatrix();; if (mapData == null) { - Gui.drawRect(0,0,getFeatureRect().width, getFeatureRect().height, 0xFFFF0000); + Gui.drawRect(0,0,featureRect.width, featureRect.height, 0xFFFF0000); } else { renderMap(partialTicks,mapProcessor,mapData,context); } GlStateManager.popMatrix(); GL11.glLineWidth(2); - RenderUtils.drawUnfilledBox(0,0,getFeatureRect().width, getFeatureRect().height, this.getParameter("border_color").getValue()); + RenderUtils.drawUnfilledBox(0,0,featureRect.width, featureRect.height, this.getParameter("border_color").getValue()); } @Override @@ -129,16 +130,18 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, drawHUD(partialTicks); return; } - Gui.drawRect(0,0,getFeatureRect().width, getFeatureRect().height, RenderUtils.getColorAt(getFeatureRect().x, getFeatureRect().y, this.getParameter("background_color").getValue())); + Rectangle featureRect =getFeatureRect().getRectangle(); + Gui.drawRect(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.getParameter("background_color").getValue())); FontRenderer fr = getFontRenderer(); - fr.drawString("Please join a dungeon to see preview", getFeatureRect().width / 2 - fr.getStringWidth("Please join a dungeon to see preview") / 2, getFeatureRect().height / 2 - fr.FONT_HEIGHT / 2, 0xFFFFFFFF); + fr.drawString("Please join a dungeon to see preview", featureRect.width / 2 - fr.getStringWidth("Please join a dungeon to see preview") / 2, featureRect.height / 2 - fr.FONT_HEIGHT / 2, 0xFFFFFFFF); GL11.glLineWidth(2); - RenderUtils.drawUnfilledBox(0,0,getFeatureRect().width, getFeatureRect().height, this.getParameter("border_color").getValue()); + RenderUtils.drawUnfilledBox(0,0,featureRect.width, featureRect.height, this.getParameter("border_color").getValue()); } public void renderMap(float partialTicks, MapProcessor mapProcessor, MapData mapData, DungeonContext context){ float postScale = this.getParameter("playerCenter").getValue() ? this.getParameter("postScale").getValue() : 1; - int width = getFeatureRect().width; + Rectangle featureRect =getFeatureRect().getRectangle(); + int width = featureRect.width; float scale = (this.getParameter("scale").getValue() ? width / 128.0f : 1); GlStateManager.translate(width / 2, width / 2, 0); GlStateManager.scale(scale, scale, 0); -- cgit