diff options
author | syeyoung <cyong06@naver.com> | 2021-07-20 13:35:06 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-07-20 14:42:12 +0900 |
commit | eb27fcef7ac26c71941c7911ebf6aa20254a2855 (patch) | |
tree | 65a84edb26375f34bf1f43b6ec4315700032da23 /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | 0af44a60844be83fb371c2f0eaeb2feccd1f0207 (diff) | |
download | Skyblock-Dungeons-Guide-eb27fcef7ac26c71941c7911ebf6aa20254a2855.tar.gz Skyblock-Dungeons-Guide-eb27fcef7ac26c71941c7911ebf6aa20254a2855.tar.bz2 Skyblock-Dungeons-Guide-eb27fcef7ac26c71941c7911ebf6aa20254a2855.zip |
Better snapping and use the new tooltips
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
9 files changed, 61 insertions, 25 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java index e195a7d9..6e82add5 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java @@ -64,6 +64,8 @@ public abstract class GuiFeature extends AbstractFeature implements ScreenRender GlStateManager.pushAttrib(); GlStateManager.pushMatrix(); Rectangle featureRect = this.featureRect.getRectangleNoScale(); + ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + GlStateManager.translate(1.0/scaledResolution.getScaleFactor(), 1.0/scaledResolution.getScaleFactor(), 1); clip(featureRect.x, featureRect.y, featureRect.width, featureRect.height); GL11.glEnable(GL11.GL_SCISSOR_TEST); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java index 2cd81c5e..8f10f146 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonFloorStat.java @@ -24,6 +24,8 @@ 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.gui.ScaledResolution; +import net.minecraftforge.fml.client.config.GuiUtils; import java.awt.*; import java.util.Arrays; @@ -83,7 +85,8 @@ public class DataRenderDungeonFloorStat implements DataRenderer { if (playedFloorFloorSpecificData == null) return; String floorName = (dungeonType == DungeonType.CATACOMBS ? "F" : "M") + floor; - RenderUtils.drawHoveringText(Arrays.asList( + ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + GuiUtils.drawHoveringText(Arrays.asList( "§bFloor "+floorName, "§bBest Score§7: §f"+playedFloorFloorSpecificData.getData().getBestScore(), "§bTotal Completions§7: §f"+playedFloorFloorSpecificData.getData().getCompletions(), @@ -94,6 +97,6 @@ public class DataRenderDungeonFloorStat implements DataRenderer { "§bFastest Run§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTime() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTime()) : "N/A"), "§bMost Mobs Killed§7: §f"+playedFloorFloorSpecificData.getData().getMostMobsKilled(), "§bTotal Mobs Killed§7: §f"+playedFloorFloorSpecificData.getData().getMobsKilled() - ), mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); + ), mouseX, mouseY, scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), -1, Minecraft.getMinecraft().fontRendererObj); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java index 44271143..58327fcf 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRenderDungeonHighestFloorStat.java @@ -24,6 +24,8 @@ 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.gui.ScaledResolution; +import net.minecraftforge.fml.client.config.GuiUtils; import java.awt.*; import java.util.Arrays; @@ -85,7 +87,8 @@ public class DataRenderDungeonHighestFloorStat implements DataRenderer { if (playedFloorFloorSpecificData == null) return; String floorName = (dungeonType == DungeonType.CATACOMBS ? "F" : "M") + dungeonStatDungeonSpecificData.getData().getHighestCompleted(); - RenderUtils.drawHoveringText(Arrays.asList( + ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + GuiUtils.drawHoveringText(Arrays.asList( "§bFloor "+floorName, "§bBest Score§7: §f"+playedFloorFloorSpecificData.getData().getBestScore(), "§bTotal Completions§7: §f"+playedFloorFloorSpecificData.getData().getCompletions(), @@ -96,6 +99,6 @@ public class DataRenderDungeonHighestFloorStat implements DataRenderer { "§bFastest Run§7: §f"+(playedFloorFloorSpecificData.getData().getFastestTime() != -1? TextUtils.formatTime(playedFloorFloorSpecificData.getData().getFastestTime()) : "N/A"), "§bMost Mobs Killed§7: §f"+playedFloorFloorSpecificData.getData().getMostMobsKilled(), "§bTotal Mobs Killed§7: §f"+playedFloorFloorSpecificData.getData().getMobsKilled() - ), mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); + ), mouseX, mouseY, scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), -1, Minecraft.getMinecraft().fontRendererObj); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererClassLv.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererClassLv.java index 459e3ceb..cc6589de 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererClassLv.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererClassLv.java @@ -25,6 +25,8 @@ import kr.syeyoung.dungeonsguide.utils.TextUtils; import kr.syeyoung.dungeonsguide.utils.XPUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraftforge.fml.client.config.GuiUtils; import java.awt.*; import java.util.Arrays; @@ -77,6 +79,9 @@ public class DataRendererClassLv implements DataRenderer { ClassSpecificData<PlayerProfile.PlayerClassData> dungeonStatDungeonSpecificData = playerProfile.getPlayerClassData().get(dungeonClass); if (dungeonStatDungeonSpecificData == null) return; XPUtils.XPCalcResult xpCalcResult = XPUtils.getCataXp(dungeonStatDungeonSpecificData.getData().getExperience()); - RenderUtils.drawHoveringText(Arrays.asList("§bCurrent Lv§7: §e"+xpCalcResult.getLevel(),"§bExp§7: §e"+ TextUtils.format((long)xpCalcResult.getRemainingXp()) + "§7/§e"+TextUtils.format((long)xpCalcResult.getNextLvXp()), "§bTotal Xp§7: §e"+ TextUtils.format((long)dungeonStatDungeonSpecificData.getData().getExperience())),mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); + ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + + GuiUtils.drawHoveringText(Arrays.asList("§bCurrent Lv§7: §e"+xpCalcResult.getLevel(),"§bExp§7: §e"+ TextUtils.format((long)xpCalcResult.getRemainingXp()) + "§7/§e"+TextUtils.format((long)xpCalcResult.getNextLvXp()), "§bTotal Xp§7: §e"+ TextUtils.format((long)dungeonStatDungeonSpecificData.getData().getExperience())),mouseX, mouseY, + scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), -1, Minecraft.getMinecraft().fontRendererObj); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererDungeonLv.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererDungeonLv.java index 0dccb1a8..b9c16e13 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererDungeonLv.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererDungeonLv.java @@ -28,6 +28,8 @@ import kr.syeyoung.dungeonsguide.utils.TextUtils; import kr.syeyoung.dungeonsguide.utils.XPUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraftforge.fml.client.config.GuiUtils; import java.awt.*; import java.util.Arrays; @@ -73,6 +75,8 @@ public class DataRendererDungeonLv implements DataRenderer { DungeonSpecificData<DungeonStat> dungeonStatDungeonSpecificData = playerProfile.getDungeonStats().get(dungeonType); if (dungeonStatDungeonSpecificData == null) return; XPUtils.XPCalcResult xpCalcResult = XPUtils.getCataXp(dungeonStatDungeonSpecificData.getData().getExperience()); - RenderUtils.drawHoveringText(Arrays.asList("§bCurrent Lv§7: §e"+xpCalcResult.getLevel(),"§bExp§7: §e"+TextUtils.format((long)xpCalcResult.getRemainingXp()) + "§7/§e"+TextUtils.format((long)xpCalcResult.getNextLvXp()), "§bTotal Xp§7: §e"+ TextUtils.format((long)dungeonStatDungeonSpecificData.getData().getExperience())),mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); + ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + GuiUtils.drawHoveringText(Arrays.asList("§bCurrent Lv§7: §e"+xpCalcResult.getLevel(),"§bExp§7: §e"+TextUtils.format((long)xpCalcResult.getRemainingXp()) + "§7/§e"+TextUtils.format((long)xpCalcResult.getNextLvXp()), "§bTotal Xp§7: §e"+ TextUtils.format((long)dungeonStatDungeonSpecificData.getData().getExperience())),mouseX, mouseY, + scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), -1, Minecraft.getMinecraft().fontRendererObj); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSelectedClassLv.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSelectedClassLv.java index 3a97f17e..8f2724aa 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSelectedClassLv.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSelectedClassLv.java @@ -27,6 +27,8 @@ import kr.syeyoung.dungeonsguide.utils.TextUtils; import kr.syeyoung.dungeonsguide.utils.XPUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraftforge.fml.client.config.GuiUtils; import java.awt.*; import java.util.Arrays; @@ -69,6 +71,8 @@ public class DataRendererSelectedClassLv implements DataRenderer { ClassSpecificData<PlayerProfile.PlayerClassData> dungeonStatDungeonSpecificData = playerProfile.getPlayerClassData().get(playerProfile.getSelectedClass()); if (dungeonStatDungeonSpecificData == null) return; XPUtils.XPCalcResult xpCalcResult = XPUtils.getCataXp(dungeonStatDungeonSpecificData.getData().getExperience()); - RenderUtils.drawHoveringText(Arrays.asList("§bCurrent Lv§7: §e"+xpCalcResult.getLevel(),"§bExp§7: §e"+ TextUtils.format((long)xpCalcResult.getRemainingXp()) + "§7/§e"+TextUtils.format((long)xpCalcResult.getNextLvXp()), "§bTotal Xp§7: §e"+ TextUtils.format((long)dungeonStatDungeonSpecificData.getData().getExperience())),mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); + ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + GuiUtils.drawHoveringText(Arrays.asList("§bCurrent Lv§7: §e"+xpCalcResult.getLevel(),"§bExp§7: §e"+ TextUtils.format((long)xpCalcResult.getRemainingXp()) + "§7/§e"+TextUtils.format((long)xpCalcResult.getNextLvXp()), "§bTotal Xp§7: §e"+ TextUtils.format((long)dungeonStatDungeonSpecificData.getData().getExperience())),mouseX, mouseY, + scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), -1, Minecraft.getMinecraft().fontRendererObj); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSkillLv.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSkillLv.java index 297db003..067226e5 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSkillLv.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/DataRendererSkillLv.java @@ -28,6 +28,8 @@ import kr.syeyoung.dungeonsguide.utils.TextUtils; import kr.syeyoung.dungeonsguide.utils.XPUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraftforge.fml.client.config.GuiUtils; import java.awt.*; import java.util.Arrays; @@ -73,6 +75,8 @@ public class DataRendererSkillLv implements DataRenderer { Double xp = playerProfile.getSkillXp().get(skill); if (xp == null) return; XPUtils.XPCalcResult xpCalcResult = XPUtils.getSkillXp(skill, xp); - RenderUtils.drawHoveringText(Arrays.asList("§bCurrent Lv§7: §e"+xpCalcResult.getLevel(),"§bExp§7: §e"+ TextUtils.format((long)xpCalcResult.getRemainingXp()) + "§7/§e"+TextUtils.format((long)xpCalcResult.getNextLvXp()), "§bTotal Xp§7: §e"+ TextUtils.format(xp.longValue())),mouseX, mouseY, Minecraft.getMinecraft().fontRendererObj); + ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); + GuiUtils.drawHoveringText(Arrays.asList("§bCurrent Lv§7: §e"+xpCalcResult.getLevel(),"§bExp§7: §e"+ TextUtils.format((long)xpCalcResult.getRemainingXp()) + "§7/§e"+TextUtils.format((long)xpCalcResult.getNextLvXp()), "§bTotal Xp§7: §e"+ TextUtils.format(xp.longValue())),mouseX, mouseY, + scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), -1, Minecraft.getMinecraft().fontRendererObj); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java index 8c152fa8..448eabe9 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/playerpreview/FeatureViewPlayerOnJoin.java @@ -72,6 +72,7 @@ import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.GuiScreenEvent; +import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.common.Loader; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; @@ -183,6 +184,12 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen } + public static void clip(ScaledResolution resolution, int x, int y, int width, int height) { + if (width < 0 || height < 0) return; + + int scale = resolution.getScaleFactor(); + GL11.glScissor((x ) * scale, Minecraft.getMinecraft().displayHeight - (y + height) * scale, (width) * scale, height * scale); + } private void render(Rectangle popupRect, ScaledResolution scaledResolution, int mouseX, int mouseY, Optional<PlayerProfile> playerProfile, boolean apiKeyPlsSet) { GlStateManager.pushMatrix(); @@ -214,7 +221,7 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen GL11.glEnable(GL11.GL_SCISSOR_TEST); - MPanel.clip(scaledResolution, popupRect.x, popupRect.y, popupRect.width, popupRect.height); + clip(scaledResolution, popupRect.x, popupRect.y, popupRect.width, popupRect.height); Gui.drawRect(0,168, 90, 195, 0xFF23272a); Gui.drawRect(2,170, 88, 193, new Rectangle(2,170,86,23).contains(relX, relY) ? 0xFFff7777 : 0xFFFF3333); @@ -315,11 +322,13 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen } } FontRenderer font = toHover.getItem().getFontRenderer(toHover); + GlStateManager.popMatrix(); GL11.glDisable(GL11.GL_SCISSOR_TEST); FontRenderer theRenderer = (font == null ? fr : font); - int minY = scaledResolution.getScaledHeight() - (list.size()+4) * theRenderer.FONT_HEIGHT - popupRect.y; - RenderUtils.drawHoveringText(list,relX, Math.min(minY, relY), theRenderer); + GuiUtils.drawHoveringText(list,mouseX, mouseY, scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), -1, theRenderer); GL11.glEnable(GL11.GL_SCISSOR_TEST); + GlStateManager.pushMatrix(); + GlStateManager.translate(popupRect.x, popupRect.y, 0); } } else { GlStateManager.enableBlend(); @@ -328,16 +337,19 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen fr.drawString("Loading", 5,35, 0xFFEFFF00); } + GlStateManager.popMatrix(); GL11.glDisable(GL11.GL_SCISSOR_TEST); if (dataRendererToHover != null && !drawInv) { - dataRendererToHover.onHover(playerProfile.get(), relX, relY); + dataRendererToHover.onHover(playerProfile.get(), mouseX, mouseY); } GL11.glEnable(GL11.GL_SCISSOR_TEST); + GlStateManager.translate(popupRect.x, popupRect.y, 0); + GlStateManager.pushMatrix(); if (drawInv && playerProfile.get().getInventory() != null) { int startX = 81; int startY = 86; - MPanel.clip(scaledResolution, popupRect.x+startX-1, popupRect.y+startY-1, 164, 74); + clip(scaledResolution, popupRect.x+startX-1, popupRect.y+startY-1, 164, 74); GlStateManager.translate(startX,startY,1); Gui.drawRect(-1,-1,163,73, 0xFF000000); GlStateManager.disableLighting(); @@ -373,11 +385,12 @@ public class FeatureViewPlayerOnJoin extends SimpleFeature implements GuiPostRen } } FontRenderer font = toHover.getItem().getFontRenderer(toHover); + GlStateManager.popMatrix(); GL11.glDisable(GL11.GL_SCISSOR_TEST); FontRenderer theRenderer = (font == null ? fr : font); - int minY = scaledResolution.getScaledHeight() - (list.size()+4) * theRenderer.FONT_HEIGHT - popupRect.y; - RenderUtils.drawHoveringText(list,rx, Math.min(minY-startY, ry), theRenderer); + GuiUtils.drawHoveringText(list,mouseX, mouseY, scaledResolution.getScaledWidth(), scaledResolution.getScaledHeight(), -1, theRenderer); GL11.glEnable(GL11.GL_SCISSOR_TEST); + GlStateManager.pushMatrix(); } } GL11.glDisable(GL11.GL_SCISSOR_TEST); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java index 4f466cc3..f2cac046 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java @@ -152,11 +152,10 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis DungeonRoom dungeonRoom = context.getRoomMapper().get(roomPt); if (dungeonRoom == null) return; if (!(dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor)) return; - ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); - int width = scaledResolution.getScaledWidth(); - int height = scaledResolution.getScaledHeight(); - int mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth; - int mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1; + int width = Minecraft.getMinecraft().displayWidth; + int height = Minecraft.getMinecraft().displayHeight; + int mouseX = Mouse.getX() ; + int mouseY = height - Mouse.getY() - 1; GlStateManager.pushMatrix(); GlStateManager.enableTexture2D(); GlStateManager.disableLighting(); @@ -379,11 +378,10 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis if (dungeonRoom == null) return; if (!(dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor)) return; - ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); - int width = scaledResolution.getScaledWidth(); - int height = scaledResolution.getScaledHeight(); - int mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth; - int mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1; + int width = Minecraft.getMinecraft().displayWidth; + int height = Minecraft.getMinecraft().displayHeight; + int mouseX = Mouse.getX(); + int mouseY = height - Mouse.getY() - 1; Rectangle feature = getFeatureRect().getRectangle(); FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; |