diff options
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/handlers')
6 files changed, 26 insertions, 27 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java index d605d8102..33c7390e6 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java @@ -1,6 +1,6 @@ package com.thatgravyboat.skyblockhud.handlers; -import com.thatgravyboat.skyblockhud.SkyblockHud; +import com.thatgravyboat.skyblockhud.LorenzMod; import com.thatgravyboat.skyblockhud.location.LocationHandler; import com.thatgravyboat.skyblockhud.location.Locations; import com.thatgravyboat.skyblockhud.utils.Utils; @@ -17,11 +17,11 @@ public class BossbarHandler { public void onBossbarRender(RenderGameOverlayEvent.Pre event) { if (event.type == RenderGameOverlayEvent.ElementType.BOSSHEALTH && BossStatus.bossName != null) { bossBarRendered = !event.isCanceled(); - if (!SkyblockHud.config.main.bossShiftHud) { + if (!LorenzMod.config.main.bossShiftHud) { bossBarRendered = false; } String bossName = Utils.removeColor(BossStatus.bossName); - if (SkyblockHud.config.renderer.hideBossBar && !LocationHandler.getCurrentLocation().equals(Locations.CATACOMBS)) { + if (LorenzMod.config.renderer.hideBossBar && !LocationHandler.getCurrentLocation().equals(Locations.CATACOMBS)) { if (bossName.equalsIgnoreCase("wither")) { event.setCanceled(true); bossBarRendered = false; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CooldownHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CooldownHandler.java index 7ae92df55..cac37c07c 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CooldownHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CooldownHandler.java @@ -1,8 +1,7 @@ package com.thatgravyboat.skyblockhud.handlers; -import at.lorenz.mod.Features; import com.google.common.collect.Sets; -import com.thatgravyboat.skyblockhud.SkyblockHud; +import com.thatgravyboat.skyblockhud.LorenzMod; import com.thatgravyboat.skyblockhud.api.item.IAbility; import com.thatgravyboat.skyblockhud.utils.Utils; import java.util.*; @@ -70,7 +69,7 @@ public class CooldownHandler { @SubscribeEvent public void tick(TickEvent.ClientTickEvent event) { - if (SkyblockHud.config.misc.hideItemCooldowns) return; + if (LorenzMod.config.misc.hideItemCooldowns) return; if (event.phase.equals(TickEvent.Phase.END)) { COOLDOWNS.values().forEach(Cooldown::tick); COOLDOWNS.entrySet().removeIf(entry -> entry.getValue().isOver()); @@ -79,7 +78,7 @@ public class CooldownHandler { @SubscribeEvent public void onPlayerInteract(PlayerInteractEvent event) { - if (SkyblockHud.config.misc.hideItemCooldowns) return; + if (LorenzMod.config.misc.hideItemCooldowns) return; if (event.action.equals(PlayerInteractEvent.Action.RIGHT_CLICK_AIR) || event.action.equals(PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK)) { if (event.entityPlayer.getHeldItem() != null) { IAbility ability = (IAbility) ((Object) event.entityPlayer.getHeldItem()); diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java index bab57f8e1..8783a928d 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java @@ -2,7 +2,7 @@ package com.thatgravyboat.skyblockhud.handlers; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import com.thatgravyboat.skyblockhud.SkyblockHud; +import com.thatgravyboat.skyblockhud.LorenzMod; import com.thatgravyboat.skyblockhud.api.events.LocationChangeEvent; import com.thatgravyboat.skyblockhud.commands.SimpleCommand; import com.thatgravyboat.skyblockhud.location.LocationCategory; @@ -59,10 +59,10 @@ public class CrystalWaypoints { public void onLocationChange(LocationChangeEvent event) { if (!event.newLocation.getCategory().equals(LocationCategory.CRYSTALHOLLOWS)) { waypoints.clear(); - } else if (!waypoints.containsKey("Crystal Nucleus") && SkyblockHud.config.mining.autoWaypoint) { + } else if (!waypoints.containsKey("Crystal Nucleus") && LorenzMod.config.mining.autoWaypoint) { waypoints.put("Crystal Nucleus", new BlockPos(512.5, 106.5, 512.5)); } - if (IMPORTANT_WAYPOINTS.contains(event.newLocation) && SkyblockHud.config.mining.autoWaypoint) { + if (IMPORTANT_WAYPOINTS.contains(event.newLocation) && LorenzMod.config.mining.autoWaypoint) { if (!waypoints.containsKey(event.newLocation.getDisplayName())) { waypoints.put(event.newLocation.getDisplayName(), Minecraft.getMinecraft().thePlayer.getPosition()); } @@ -76,7 +76,7 @@ public class CrystalWaypoints { if (!matcher.find()) return; ChatStyle style = new ChatStyle(); style.setParentStyle(event.message.getChatStyle()); - ClickEvent.Action action = SkyblockHud.config.mining.chatWaypointMode == 0 ? ClickEvent.Action.RUN_COMMAND : ClickEvent.Action.SUGGEST_COMMAND; + ClickEvent.Action action = LorenzMod.config.mining.chatWaypointMode == 0 ? ClickEvent.Action.RUN_COMMAND : ClickEvent.Action.SUGGEST_COMMAND; style.setChatClickEvent(new ClickEvent(action, "/sbhpoints addat " + matcher.group(2) + " " + matcher.group(3) + " " + matcher.group(4) + " " + matcher.group(1))); style.setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText("Click to add waypoint!").setChatStyle(new ChatStyle().setBold(true)))); event.message.setChatStyle(style); diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java index 937a5a498..6feee2a53 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java @@ -2,7 +2,7 @@ package com.thatgravyboat.skyblockhud.handlers; import static com.thatgravyboat.skyblockhud.GuiTextures.mapOverlay; -import com.thatgravyboat.skyblockhud.SkyblockHud; +import com.thatgravyboat.skyblockhud.LorenzMod; import com.thatgravyboat.skyblockhud.config.KeyBindings; import com.thatgravyboat.skyblockhud.config.SBHConfig; import com.thatgravyboat.skyblockhud.core.config.Position; @@ -57,7 +57,7 @@ public class MapHandler { } public boolean cantRender() { - SBHConfig.Map mapConfig = SkyblockHud.config.map; + SBHConfig.Map mapConfig = LorenzMod.config.map; if (mapConfig.showInfoIcons && type.equals(MapIconTypes.INFO)) return false; else if (mapConfig.showMiscIcons && type.equals(MapIconTypes.MISC)) return false; else if (mapConfig.showNpcIcons && type.equals(MapIconTypes.NPC)) return false; else if (mapConfig.showQuestIcons && type.equals(MapIconTypes.QUEST)) return false; else return (!mapConfig.showShopIcons || !type.equals(MapIconTypes.SHOPS)); } } @@ -97,7 +97,7 @@ public class MapHandler { @SubscribeEvent public void renderOverlay(RenderGameOverlayEvent.Post event) { - if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), SkyblockHud.config.map.showMiniMap)) { + if (Utils.overlayShouldRender(event.type, LorenzMod.hasSkyblockScoreboard(), LorenzMod.config.map.showMiniMap)) { Minecraft mc = Minecraft.getMinecraft(); if (mc.currentScreen instanceof MapScreen) return; if (LocationHandler.getCurrentLocation().getCategory().getMap() == null) return; @@ -105,7 +105,7 @@ public class MapHandler { MapHandler.Maps map = LocationHandler.getCurrentLocation().getCategory().getMap(); mc.renderEngine.bindTexture(mapOverlay); GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f); - Position pos = SkyblockHud.config.map.miniMapPosition; + Position pos = LorenzMod.config.map.miniMapPosition; Gui.drawModalRectWithCustomSizedTexture(pos.getAbsX(event.resolution, 72), pos.getAbsY(event.resolution, 72), 72, 0, 72, 72, 256, 256); mc.renderEngine.bindTexture(map.mapTexture); @@ -119,7 +119,7 @@ public class MapHandler { Gui.drawModalRectWithCustomSizedTexture(pos.getAbsX(event.resolution, 72) + 4, pos.getAbsY(event.resolution, 72) + 2, u, v, 64, 64, 256, 256); - if (SkyblockHud.config.map.showPlayerLocation) { + if (LorenzMod.config.map.showPlayerLocation) { mc.fontRendererObj.drawString("\u2022", pos.getAbsX(event.resolution, 72) + 36, pos.getAbsY(event.resolution, 72) + 34, 0xff0000, false); } @@ -138,7 +138,7 @@ public class MapHandler { @SubscribeEvent public void clientTick(TickEvent.ClientTickEvent event) { - if (KeyBindings.map.isPressed() && LocationHandler.getCurrentLocation().getCategory().getMap() != null && SkyblockHud.hasSkyblockScoreboard()) SkyblockHud.screenToOpen = new MapScreen(); + if (KeyBindings.map.isPressed() && LocationHandler.getCurrentLocation().getCategory().getMap() != null && LorenzMod.hasSkyblockScoreboard()) LorenzMod.screenToOpen = new MapScreen(); } public static class MapScreen extends GuiScreen { @@ -154,7 +154,7 @@ public class MapHandler { float mapY = (height / 2f) - ((map.height / 2f) * map.scaleFactor); Gui.drawModalRectWithCustomSizedTexture((int) mapX, (int) mapY, 0, 0, (int) (map.width * map.scaleFactor), (int) (map.height * map.scaleFactor), (int) (map.width * map.scaleFactor), (int) (map.height * map.scaleFactor)); drawIcons((int) mapX, (int) mapY); - if (this.mc.thePlayer != null && SkyblockHud.config.map.showPlayerLocation) { + if (this.mc.thePlayer != null && LorenzMod.config.map.showPlayerLocation) { double x = this.mc.thePlayer.getPosition().getX() + map.xOffset; double z = this.mc.thePlayer.getPosition().getZ() + map.yOffset; fontRendererObj.drawString("\u2022", (int) (x * map.scaleFactor + mapX), (int) (z * map.scaleFactor + mapY), 0xff0000); diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java index 9a7679fde..5cef441ff 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java @@ -4,7 +4,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import com.thatgravyboat.skyblockhud.SkyblockHud; +import com.thatgravyboat.skyblockhud.LorenzMod; import com.thatgravyboat.skyblockhud.textures.Textures; import com.thatgravyboat.skyblockhud.utils.Utils; import java.io.BufferedReader; @@ -42,7 +42,7 @@ public class NpcDialogue implements IResourceManagerReloadListener { @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - if (event.phase.equals(TickEvent.Phase.START) || SkyblockHud.config.misc.hideDialogueBox) return; + if (event.phase.equals(TickEvent.Phase.START) || LorenzMod.config.misc.hideDialogueBox) return; if (showDialogue) ticks++; else ticks = 0; if (showDialogue && ticks % 60 == 0) { @@ -56,7 +56,7 @@ public class NpcDialogue implements IResourceManagerReloadListener { @SubscribeEvent(priority = EventPriority.LOWEST) public void onChat(ClientChatReceivedEvent event) { - if (event.type != 2 && !SkyblockHud.config.misc.hideDialogueBox) { + if (event.type != 2 && !LorenzMod.config.misc.hideDialogueBox) { String message = Utils.removeColor(event.message.getUnformattedText()); if (message.toLowerCase(Locale.ENGLISH).startsWith("[npc]")) { Matcher matcher = NPC_DIALOGUE_REGEX.matcher(message); @@ -73,13 +73,13 @@ public class NpcDialogue implements IResourceManagerReloadListener { @SubscribeEvent public void renderOverlay(RenderGameOverlayEvent.Post event) { - if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), showDialogue, !SkyblockHud.config.misc.hideDialogueBox)) { + if (Utils.overlayShouldRender(event.type, LorenzMod.hasSkyblockScoreboard(), showDialogue, !LorenzMod.config.misc.hideDialogueBox)) { Minecraft mc = Minecraft.getMinecraft(); mc.renderEngine.bindTexture(Textures.texture.dialogue); GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f); - int x = SkyblockHud.config.misc.dialoguePos.getAbsX(event.resolution, 182) - 91; - int y = SkyblockHud.config.misc.dialoguePos.getAbsY(event.resolution, 68); + int x = LorenzMod.config.misc.dialoguePos.getAbsX(event.resolution, 182) - 91; + int y = LorenzMod.config.misc.dialoguePos.getAbsY(event.resolution, 68); Gui.drawModalRectWithCustomSizedTexture(x, y, 0, 0, 182, 68, 256, 256); diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/WarpHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/WarpHandler.java index 77a4199ad..23953d576 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/WarpHandler.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/WarpHandler.java @@ -3,7 +3,7 @@ package com.thatgravyboat.skyblockhud.handlers; import com.google.common.collect.HashMultimap; import com.google.common.collect.SetMultimap; import com.google.gson.*; -import com.thatgravyboat.skyblockhud.SkyblockHud; +import com.thatgravyboat.skyblockhud.LorenzMod; import com.thatgravyboat.skyblockhud.api.events.ProfileJoinedEvent; import com.thatgravyboat.skyblockhud.api.events.ProfileSwitchedEvent; import com.thatgravyboat.skyblockhud.mixins.GuiChestAccessor; @@ -96,7 +96,7 @@ public class WarpHandler { }); json.add("profileWarps", array); - warpConfig = new File(SkyblockHud.configDirectory, "sbh-warps.json"); + warpConfig = new File(LorenzMod.configDirectory, "sbh-warps.json"); try { warpConfig.createNewFile(); @@ -107,7 +107,7 @@ public class WarpHandler { } public static boolean load() { - warpConfig = new File(SkyblockHud.configDirectory, "sbh-warps.json"); + warpConfig = new File(LorenzMod.configDirectory, "sbh-warps.json"); try { if (warpConfig.createNewFile()) return true; |