diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced')
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced/FeatureDebuggableMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced/FeatureDebuggableMap.java index 97c3f7db..79dcaef9 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced/FeatureDebuggableMap.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced/FeatureDebuggableMap.java @@ -54,8 +54,8 @@ public class FeatureDebuggableMap extends GuiFeature { @Override public void drawDemo(float partialTicks) { 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); + Rectangle featureRect = getFeatureRect().getRectangle(); GL11.glLineWidth(2); - RenderUtils.drawUnfilledBox(0,0,getFeatureRect().width, getFeatureRect().height, 0xff000000, false); + RenderUtils.drawUnfilledBox(0,0,featureRect.width, featureRect.height, 0xff000000, false); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced/FeatureRoomCoordDisplay.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced/FeatureRoomCoordDisplay.java index ada1e3ef..abb5bebe 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced/FeatureRoomCoordDisplay.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/advanced/FeatureRoomCoordDisplay.java @@ -48,7 +48,7 @@ public class FeatureRoomCoordDisplay extends GuiFeature { FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj; - double scale = getFeatureRect().getHeight() / fontRenderer.FONT_HEIGHT; + double scale = getFeatureRect().getRectangle().getHeight() / fontRenderer.FONT_HEIGHT; GlStateManager.scale(scale, scale, 0); int color = this.<Color>getParameter("color").getValue().getRGB(); @@ -60,6 +60,8 @@ public class FeatureRoomCoordDisplay extends GuiFeature { FontRenderer fr = getFontRenderer(); int facing = (int) (Minecraft.getMinecraft().thePlayer.rotationYaw + 45) % 360; if (facing < 0) facing += 360; + double scale = getFeatureRect().getRectangle().getHeight() / fr.FONT_HEIGHT; + GlStateManager.scale(scale, scale, 0); fr.drawString("X: 0 Y: 3 Z: 5 Facing: "+FeatureRoomCoordDisplay.facing[(facing / 90) % 4], 0,0, this.<Color>getParameter("color").getValue().getRGB()); } |