aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/lorenz/mod/Features.java4
-rw-r--r--src/main/java/at/lorenz/mod/HideNotClickableItems.kt6
-rw-r--r--src/main/java/at/lorenz/mod/chat/ChatFilter.kt4
-rw-r--r--src/main/java/at/lorenz/mod/dungeon/DungeonChatFilter.kt5
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java4
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/LorenzMod.java (renamed from src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java)8
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java4
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java4
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/BossbarHandler.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/CooldownHandler.java7
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java8
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/MapHandler.java14
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/NpcDialogue.java12
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/WarpHandler.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java4
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java24
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java4
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java4
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java20
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java22
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java10
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java8
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java14
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerFileLoader.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java6
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java10
29 files changed, 118 insertions, 124 deletions
diff --git a/src/main/java/at/lorenz/mod/Features.java b/src/main/java/at/lorenz/mod/Features.java
index 2553f1d8d..2aeed312c 100644
--- a/src/main/java/at/lorenz/mod/Features.java
+++ b/src/main/java/at/lorenz/mod/Features.java
@@ -1,7 +1,7 @@
package at.lorenz.mod;
import com.google.gson.annotations.Expose;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.config.SBHConfigEditor;
import com.thatgravyboat.skyblockhud.core.GuiScreenElementWrapper;
import com.thatgravyboat.skyblockhud.core.config.Config;
@@ -17,7 +17,7 @@ public class Features extends Config {
private void editOverlay(String activeConfig, int width, int height, Position position) {
Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> {
}, () -> {
- }, () -> SkyblockHud.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(SkyblockHud.config, activeConfig))));
+ }, () -> LorenzMod.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(LorenzMod.config, activeConfig))));
}
@Override
diff --git a/src/main/java/at/lorenz/mod/HideNotClickableItems.kt b/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
index 8c9e28d83..cd871ba4f 100644
--- a/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
+++ b/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
@@ -1,7 +1,6 @@
package at.lorenz.mod
import at.lorenz.mod.bazaar.BazaarApi
-import at.lorenz.mod.config.LorenzConfig
import at.lorenz.mod.events.GuiContainerEvent
import at.lorenz.mod.utils.ItemUtils
import at.lorenz.mod.utils.ItemUtils.cleanName
@@ -10,8 +9,7 @@ import at.lorenz.mod.utils.LorenzColor
import at.lorenz.mod.utils.LorenzUtils
import at.lorenz.mod.utils.LorenzUtils.removeColorCodes
import at.lorenz.mod.utils.RenderUtils.highlight
-import com.thatgravyboat.skyblockhud.SkyblockHud
-import com.thatgravyboat.skyblockhud.config.SBHConfig
+import com.thatgravyboat.skyblockhud.LorenzMod
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.inventory.GuiChest
import net.minecraft.client.renderer.GlStateManager
@@ -137,7 +135,7 @@ class HideNotClickableItems {
private fun isDisabled(): Boolean {
if (bypassUntil > System.currentTimeMillis()) return true
- return !SkyblockHud.feature.inventory.hideNotClickableItems
+ return !LorenzMod.feature.inventory.hideNotClickableItems
}
private fun hide(chestName: String, stack: ItemStack): Boolean {
diff --git a/src/main/java/at/lorenz/mod/chat/ChatFilter.kt b/src/main/java/at/lorenz/mod/chat/ChatFilter.kt
index 8ac709681..5239bd088 100644
--- a/src/main/java/at/lorenz/mod/chat/ChatFilter.kt
+++ b/src/main/java/at/lorenz/mod/chat/ChatFilter.kt
@@ -3,14 +3,14 @@ package at.lorenz.mod.chat
import at.lorenz.mod.events.LorenzChatEvent
import at.lorenz.mod.utils.LorenzUtils
import at.lorenz.mod.utils.LorenzUtils.matchRegex
-import com.thatgravyboat.skyblockhud.SkyblockHud
+import com.thatgravyboat.skyblockhud.LorenzMod
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class ChatFilter {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
- if (!SkyblockHud.feature.chat.filter) return
+ if (!LorenzMod.feature.chat.filter) return
val blockReason = block(event.message)
if (blockReason != "") {
diff --git a/src/main/java/at/lorenz/mod/dungeon/DungeonChatFilter.kt b/src/main/java/at/lorenz/mod/dungeon/DungeonChatFilter.kt
index 0db9b9e8f..578b37020 100644
--- a/src/main/java/at/lorenz/mod/dungeon/DungeonChatFilter.kt
+++ b/src/main/java/at/lorenz/mod/dungeon/DungeonChatFilter.kt
@@ -1,9 +1,8 @@
package at.lorenz.mod.dungeon
-import at.lorenz.mod.config.LorenzConfig
import at.lorenz.mod.events.LorenzChatEvent
import at.lorenz.mod.utils.LorenzUtils.matchRegex
-import com.thatgravyboat.skyblockhud.SkyblockHud
+import com.thatgravyboat.skyblockhud.LorenzMod
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class DungeonChatFilter {
@@ -11,7 +10,7 @@ class DungeonChatFilter {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
- if (!SkyblockHud.feature.dungeon.hideAnnoyingMessages) return
+ if (!LorenzMod.feature.dungeon.hideAnnoyingMessages) return
val blockReason = block(event.message)
if (blockReason != "") {
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java
index 83b2c0973..da1c98ee3 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/ComponentHandler.java
@@ -34,8 +34,8 @@ public class ComponentHandler {
boolean eventPass = false;
if (mc.theWorld != null) {
List<NetworkPlayerInfo> players = sortingList.sortedCopy(mc.thePlayer.sendQueue.getPlayerInfoMap());
- GuiIngameForge.renderObjective = !SkyblockHud.hasSkyblockScoreboard() || !SkyblockHud.config.misc.hideScoreboard;
- if (players != null && SkyblockHud.hasSkyblockScoreboard()) {
+ GuiIngameForge.renderObjective = !LorenzMod.hasSkyblockScoreboard() || !LorenzMod.config.misc.hideScoreboard;
+ if (players != null && LorenzMod.hasSkyblockScoreboard()) {
if (ticksExisted % 60 == 0) {
for (NetworkPlayerInfo player : players) {
if (player.getDisplayName() != null) {
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java b/src/main/java/com/thatgravyboat/skyblockhud/LorenzMod.java
index 022317457..a07604db0 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/LorenzMod.java
@@ -26,15 +26,13 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
-import java.io.*;
-import java.nio.charset.StandardCharsets;
-
-@Mod(modid = SkyblockHud.MODID, version = SkyblockHud.VERSION)
-public class SkyblockHud {
+@Mod(modid = LorenzMod.MODID, version = LorenzMod.VERSION)
+public class LorenzMod {
public static final String MODID = "lorenzmod";
public static final String VERSION = "0.1";
+ @Deprecated
public static SBHConfig config;//TODO delete
public static Features feature;
private File configFile;
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java b/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java
index 3c5936057..8436dc91d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/api/LeaderboardGetter.java
@@ -2,7 +2,7 @@ package com.thatgravyboat.skyblockhud.api;
import static com.thatgravyboat.skyblockhud.ComponentHandler.SCOREBOARD_CHARACTERS;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.api.events.SidebarLineUpdateEvent;
import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent;
import com.thatgravyboat.skyblockhud.api.events.SidebarPreGetEvent;
@@ -36,7 +36,7 @@ public class LeaderboardGetter {
if (ticks % 5 != 0) return;
Minecraft mc = Minecraft.getMinecraft();
- if (mc.theWorld != null && SkyblockHud.hasSkyblockScoreboard()) {
+ if (mc.theWorld != null && LorenzMod.hasSkyblockScoreboard()) {
Scoreboard scoreboard = mc.theWorld.getScoreboard();
ScoreObjective sidebarObjective = scoreboard.getObjectiveInDisplaySlot(1);
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
index 1cba2dcca..1e6a9ba71 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/commands/Commands.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.commands;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.config.SBHConfigEditor;
import com.thatgravyboat.skyblockhud.core.GuiScreenElementWrapper;
import com.thatgravyboat.skyblockhud.handlers.CrystalWaypoints;
@@ -15,9 +15,9 @@ public class Commands {
private static final SimpleCommand.ProcessCommandRunnable settingsRunnable = new SimpleCommand.ProcessCommandRunnable() {
public void processCommand(ICommandSender sender, String[] args) {
if (args.length > 0) {
- SkyblockHud.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(SkyblockHud.feature, StringUtils.join(args, " ")));
+ LorenzMod.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(LorenzMod.feature, StringUtils.join(args, " ")));
} else {
- SkyblockHud.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(SkyblockHud.feature));
+ LorenzMod.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(LorenzMod.feature));
}
}
};
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
index 454eee843..f899400ca 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/config/SBHConfig.java
@@ -1,7 +1,7 @@
package com.thatgravyboat.skyblockhud.config;
import com.google.gson.annotations.Expose;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.core.GuiScreenElementWrapper;
import com.thatgravyboat.skyblockhud.core.config.Config;
import com.thatgravyboat.skyblockhud.core.config.Position;
@@ -15,7 +15,7 @@ import net.minecraft.client.Minecraft;
public class SBHConfig extends Config {
private void editOverlay(String activeConfig, int width, int height, Position position) {
- Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> {}, () -> {}, () -> SkyblockHud.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(SkyblockHud.config, activeConfig))));
+ Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> {}, () -> {}, () -> LorenzMod.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(LorenzMod.config, activeConfig))));
}
@Override
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;
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java
index b6ef6fbac..16c524970 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/location/LocationCategory.java
@@ -2,7 +2,7 @@ package com.thatgravyboat.skyblockhud.location;
import static com.thatgravyboat.skyblockhud.handlers.MapHandler.Maps;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.handlers.MapHandler;
public enum LocationCategory {
@@ -45,7 +45,7 @@ public enum LocationCategory {
}
public MapHandler.Maps getMap() {
- if (this.map != null && SkyblockHud.config.map.mapLocations.contains(this.ordinal() - 2)) return this.map; else return null;
+ if (this.map != null && LorenzMod.config.map.mapLocations.contains(this.ordinal() - 2)) return this.map; else return null;
}
public boolean isMiningCategory() {
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java
index eaa1b5a74..843d4b2ca 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinGuiIngameForge.java
@@ -2,7 +2,7 @@ package com.thatgravyboat.skyblockhud.mixins;
import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.overlay.MiningHud;
import com.thatgravyboat.skyblockhud.utils.Utils;
import net.minecraft.client.Minecraft;
@@ -24,7 +24,7 @@ public class MixinGuiIngameForge {
@Inject(method = "renderArmor", at = @At("HEAD"), cancellable = true, remap = false)
public void onRenderArmor(int width, int height, CallbackInfo ci) {
- if (SkyblockHud.config.renderer.hideArmor && SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.config.renderer.hideArmor && LorenzMod.hasSkyblockScoreboard()) {
ci.cancel();
if (prePost(ARMOR, eventParent)) return;
postPost(ARMOR, eventParent);
@@ -33,7 +33,7 @@ public class MixinGuiIngameForge {
@Inject(method = "renderHealth", at = @At("HEAD"), cancellable = true, remap = false)
public void onRenderHealth(int width, int height, CallbackInfo ci) {
- if (SkyblockHud.config.renderer.hideHearts && SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.config.renderer.hideHearts && LorenzMod.hasSkyblockScoreboard()) {
ci.cancel();
if (prePost(HEALTH, eventParent)) return;
postPost(HEALTH, eventParent);
@@ -42,7 +42,7 @@ public class MixinGuiIngameForge {
@Inject(method = "renderAir", at = @At("HEAD"), cancellable = true, remap = false)
public void onRenderAir(int width, int height, CallbackInfo ci) {
- if (SkyblockHud.config.renderer.hideAir && SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.config.renderer.hideAir && LorenzMod.hasSkyblockScoreboard()) {
ci.cancel();
if (prePost(AIR, eventParent)) return;
postPost(AIR, eventParent);
@@ -51,7 +51,7 @@ public class MixinGuiIngameForge {
@Inject(method = "renderHealthMount", at = @At("HEAD"), cancellable = true, remap = false)
public void onRenderHealthMount(int width, int height, CallbackInfo ci) {
- if (SkyblockHud.config.renderer.hideAnimalHearts && SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.config.renderer.hideAnimalHearts && LorenzMod.hasSkyblockScoreboard()) {
ci.cancel();
if (prePost(HEALTHMOUNT, eventParent)) return;
postPost(HEALTHMOUNT, eventParent);
@@ -60,12 +60,12 @@ public class MixinGuiIngameForge {
@Inject(method = "renderExperience", at = @At("HEAD"), cancellable = true, remap = false)
public void onRenderExperience(int width, int height, CallbackInfo ci) {
- if (SkyblockHud.config.renderer.hideXpBar && SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.config.renderer.hideXpBar && LorenzMod.hasSkyblockScoreboard()) {
ci.cancel();
if (prePost(EXPERIENCE, eventParent)) return;
postPost(EXPERIENCE, eventParent);
- } else if (SkyblockHud.config.mining.barMode == 1) {
- if (!SkyblockHud.config.renderer.hideXpBar && (SkyblockHud.config.mining.showDrillBar || SkyblockHud.config.mining.showHeatBar) && SkyblockHud.hasSkyblockScoreboard()) {
+ } else if (LorenzMod.config.mining.barMode == 1) {
+ if (!LorenzMod.config.renderer.hideXpBar && (LorenzMod.config.mining.showDrillBar || LorenzMod.config.mining.showHeatBar) && LorenzMod.hasSkyblockScoreboard()) {
if (MiningHud.getHeat() > 0 || Utils.isDrill(Minecraft.getMinecraft().thePlayer.getHeldItem())) {
ci.cancel();
if (prePost(EXPERIENCE, eventParent)) return;
@@ -77,12 +77,12 @@ public class MixinGuiIngameForge {
@Inject(method = "renderJumpBar", at = @At("HEAD"), cancellable = true, remap = false)
public void onRenderJumpBar(int width, int height, CallbackInfo ci) {
- if (SkyblockHud.config.renderer.hideXpBar && SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.config.renderer.hideXpBar && LorenzMod.hasSkyblockScoreboard()) {
ci.cancel();
if (prePost(JUMPBAR, eventParent)) return;
postPost(JUMPBAR, eventParent);
- } else if (SkyblockHud.config.mining.barMode == 1) {
- if (!SkyblockHud.config.renderer.hideXpBar && (SkyblockHud.config.mining.showDrillBar || SkyblockHud.config.mining.showHeatBar) && SkyblockHud.hasSkyblockScoreboard()) {
+ } else if (LorenzMod.config.mining.barMode == 1) {
+ if (!LorenzMod.config.renderer.hideXpBar && (LorenzMod.config.mining.showDrillBar || LorenzMod.config.mining.showHeatBar) && LorenzMod.hasSkyblockScoreboard()) {
if (MiningHud.getHeat() > 0 || Utils.isDrill(Minecraft.getMinecraft().thePlayer.getHeldItem())) {
ci.cancel();
if (prePost(JUMPBAR, eventParent)) return;
@@ -94,7 +94,7 @@ public class MixinGuiIngameForge {
@Inject(method = "renderFood", at = @At("HEAD"), cancellable = true, remap = false)
public void onRenderFood(int width, int height, CallbackInfo ci) {
- if (SkyblockHud.config.renderer.hideFood && SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.config.renderer.hideFood && LorenzMod.hasSkyblockScoreboard()) {
ci.cancel();
if (prePost(FOOD, eventParent)) return;
postPost(FOOD, eventParent);
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java
index 1f372ad40..c42d830d1 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.mixins;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.api.item.IAbility;
import com.thatgravyboat.skyblockhud.handlers.CooldownHandler;
import java.util.regex.Matcher;
@@ -19,7 +19,7 @@ public class MixinItemStack implements IAbility {
@Inject(method = "setTagCompound", at = @At("HEAD"))
public void onNbt(NBTTagCompound nbt, CallbackInfo ci) {
- if (SkyblockHud.config != null && !SkyblockHud.config.misc.hideItemCooldowns) {
+ if (LorenzMod.config != null && !LorenzMod.config.misc.hideItemCooldowns) {
Matcher abilityMatcher = CooldownHandler.getAbility(nbt);
if (abilityMatcher != null) {
ability = abilityMatcher.group(1);
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java
index 40f33342e..753d5fbc9 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinNetHandlerPlayClient.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.mixins;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.tracker.TrackerHandler;
import net.minecraft.client.Minecraft;
import net.minecraft.client.network.NetHandlerPlayClient;
@@ -22,7 +22,7 @@ public class MixinNetHandlerPlayClient {
@Inject(method = "handleSetSlot", at = @At("HEAD"))
public void onHandleSetSlot(S2FPacketSetSlot packetIn, CallbackInfo ci) {
- if (SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.hasSkyblockScoreboard()) {
Minecraft mc = Minecraft.getMinecraft();
PacketThreadUtil.checkThreadAndEnqueue(packetIn, mc.getNetHandler(), mc);
if (packetIn.func_149175_c() == 0) {
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java
index 9cfa1e76c..c4216a44f 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.overlay;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.config.SBHConfig;
import com.thatgravyboat.skyblockhud.core.config.Position;
import com.thatgravyboat.skyblockhud.dungeons.Classes;
@@ -28,13 +28,13 @@ public class DungeonOverlay extends Gui {
private static boolean bossBarVisible = false;
public void drawDungeonPlayer(String name, int health, boolean isDead, Classes dungeonClass, int x, int y) {
- if (!SkyblockHud.config.dungeon.hideDeadDungeonPlayers || !isDead) {
+ if (!LorenzMod.config.dungeon.hideDeadDungeonPlayers || !isDead) {
GlStateManager.enableBlend();
Minecraft mc = Minecraft.getMinecraft();
mc.renderEngine.bindTexture(Textures.texture.dungeon);
String healthString = isDead ? "DEAD" : Integer.toString(health);
- GlStateManager.color(1.0F, 1.0F, 1.0F, (float) SkyblockHud.config.dungeon.dungeonPlayerOpacity / 100);
+ GlStateManager.color(1.0F, 1.0F, 1.0F, (float) LorenzMod.config.dungeon.dungeonPlayerOpacity / 100);
drawTexturedModalRect(x, y, 0, dungeonClass.getTextureY(), 120, 32);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
drawString(font, name, x + 50, y + 6, 0xFFFFFF);
@@ -99,9 +99,9 @@ public class DungeonOverlay extends Gui {
}
public void drawUltimateBar(Minecraft mc, ScaledResolution resolution) {
- if (!SkyblockHud.config.dungeon.hideUltimateBar) {
+ if (!LorenzMod.config.dungeon.hideUltimateBar) {
float percentage = mc.thePlayer.experience;
- SBHConfig.DungeonHud dungeonHud = SkyblockHud.config.dungeon;
+ SBHConfig.DungeonHud dungeonHud = LorenzMod.config.dungeon;
Position position = dungeonHud.barPosition;
int x = position.getAbsX(resolution, 182);
@@ -114,15 +114,15 @@ public class DungeonOverlay extends Gui {
@SubscribeEvent
public void renderOverlay(RenderGameOverlayEvent.Post event) {
Minecraft mc = Minecraft.getMinecraft();
- if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), LocationHandler.getCurrentLocation().equals(Locations.CATACOMBS))) {
+ if (Utils.overlayShouldRender(event.type, LorenzMod.hasSkyblockScoreboard(), LocationHandler.getCurrentLocation().equals(Locations.CATACOMBS))) {
bossBarVisible = BossStatus.statusBarTime > 0 && GuiIngameForge.renderBossHealth && BossbarHandler.bossBarRendered;
GlStateManager.enableBlend();
drawUltimateBar(mc, event.resolution);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- if (!SkyblockHud.config.dungeon.hideDungeonPlayers) {
+ if (!LorenzMod.config.dungeon.hideDungeonPlayers) {
int[] hardCodedPos = new int[] { 5, 42, 79, 116 };
- Position[] positions = new Position[] { SkyblockHud.config.dungeon.dungeonPlayer1, SkyblockHud.config.dungeon.dungeonPlayer2, SkyblockHud.config.dungeon.dungeonPlayer3, SkyblockHud.config.dungeon.dungeonPlayer4 };
+ Position[] positions = new Position[] { LorenzMod.config.dungeon.dungeonPlayer1, LorenzMod.config.dungeon.dungeonPlayer2, LorenzMod.config.dungeon.dungeonPlayer3, LorenzMod.config.dungeon.dungeonPlayer4 };
for (int i = 0; i < Math.min(DungeonHandler.getDungeonPlayers().values().size(), 4); i++) {
DungeonPlayer player = (DungeonPlayer) DungeonHandler.getDungeonPlayers().values().toArray()[i];
int posX;
@@ -141,8 +141,8 @@ public class DungeonOverlay extends Gui {
}
}
- if (!SkyblockHud.config.main.disaleMainHud) {
- drawDungeonClock(event.resolution.getScaledWidth(), SkyblockHud.config.main.mainHudPos.getAbsY(event.resolution, 34), mc);
+ if (!LorenzMod.config.main.disaleMainHud) {
+ drawDungeonClock(event.resolution.getScaledWidth(), LorenzMod.config.main.mainHudPos.getAbsY(event.resolution, 34), mc);
}
}
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
index daf3ec036..5f4b97747 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.overlay;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.core.util.render.RenderUtils;
import com.thatgravyboat.skyblockhud.textures.Textures;
import java.awt.*;
@@ -11,7 +11,7 @@ import net.minecraft.client.renderer.GlStateManager;
public class GenericOverlays extends Gui {
public static void drawLargeBar(Minecraft mc, int x, int y, float percentage, float max, int fullColor, int loadingColor, int barStyle) {
- if (SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.hasSkyblockScoreboard()) {
mc.renderEngine.bindTexture(Textures.texture.bars);
Color color = new Color(percentage == max ? fullColor : loadingColor);
@@ -26,7 +26,7 @@ public class GenericOverlays extends Gui {
}
public static void drawSmallBar(Minecraft mc, int x, int y, double percentage, double max, int fullColor, int loadingColor, int barStyle) {
- if (SkyblockHud.hasSkyblockScoreboard()) {
+ if (LorenzMod.hasSkyblockScoreboard()) {
mc.renderEngine.bindTexture(Textures.texture.bars);
Color color = new Color(percentage == max ? fullColor : loadingColor);
GlStateManager.enableBlend();
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java
index a3aab50b1..ae032e21e 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.overlay;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.core.config.Position;
import com.thatgravyboat.skyblockhud.textures.Textures;
import com.thatgravyboat.skyblockhud.utils.Utils;
@@ -30,25 +30,25 @@ public class MiningHud extends Gui {
@SubscribeEvent
public void renderOverlay(RenderGameOverlayEvent.Post event) {
- if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), SkyblockHud.config.mining.showDrillBar || SkyblockHud.config.mining.showHeatBar)) {
+ if (Utils.overlayShouldRender(event.type, LorenzMod.hasSkyblockScoreboard(), LorenzMod.config.mining.showDrillBar || LorenzMod.config.mining.showHeatBar)) {
Minecraft mc = Minecraft.getMinecraft();
- if (SkyblockHud.config.mining.barMode == 1) {
- if (heat > 0 && Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.mining.showDrillBar && SkyblockHud.config.mining.showHeatBar) {
+ if (LorenzMod.config.mining.barMode == 1) {
+ if (heat > 0 && Utils.isDrill(mc.thePlayer.getHeldItem()) && LorenzMod.config.mining.showDrillBar && LorenzMod.config.mining.showHeatBar) {
renderFuelBar(mc, (event.resolution.getScaledWidth() / 2) - 91, event.resolution.getScaledHeight() - 31);
renderHeatBar(mc, (event.resolution.getScaledWidth() / 2) + 46, event.resolution.getScaledHeight() - 31);
- } else if (Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.mining.showDrillBar) {
+ } else if (Utils.isDrill(mc.thePlayer.getHeldItem()) && LorenzMod.config.mining.showDrillBar) {
renderFuelBar(mc, (event.resolution.getScaledWidth() / 2) - 68, event.resolution.getScaledHeight() - 31);
- } else if (heat > 0 && SkyblockHud.config.mining.showHeatBar) {
+ } else if (heat > 0 && LorenzMod.config.mining.showHeatBar) {
renderHeatBar(mc, (event.resolution.getScaledWidth() / 2) - 22, event.resolution.getScaledHeight() - 31);
}
- } else if (SkyblockHud.config.mining.barMode == 0) {
- if (heat > 0 && SkyblockHud.config.mining.showHeatBar) {
- Position position = SkyblockHud.config.mining.heatBar;
+ } else if (LorenzMod.config.mining.barMode == 0) {
+ if (heat > 0 && LorenzMod.config.mining.showHeatBar) {
+ Position position = LorenzMod.config.mining.heatBar;
renderHeatBar(mc, position.getAbsX(event.resolution, 45), position.getAbsY(event.resolution, 7));
}
- if (Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.mining.showDrillBar) {
- Position position = SkyblockHud.config.mining.drillBar;
+ if (Utils.isDrill(mc.thePlayer.getHeldItem()) && LorenzMod.config.mining.showDrillBar) {
+ Position position = LorenzMod.config.mining.drillBar;
renderFuelBar(mc, position.getAbsX(event.resolution, 136), position.getAbsY(event.resolution, 7));
}
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java
index 70cb1532b..01734a883 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.overlay;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.handlers.BossbarHandler;
import com.thatgravyboat.skyblockhud.handlers.CurrencyHandler;
import com.thatgravyboat.skyblockhud.handlers.SlayerHandler;
@@ -46,7 +46,7 @@ public class OverlayHud extends Gui {
drawTexturedModalRect((width / 2) - 17, offset + (bossBarVisible ? 17 : 0), 0, 0, 34, 34);
drawTexturedModalRect((width / 2) - 4, offset + (bossBarVisible ? 24 : 7), (timeHour > 19 || timeHour < 6) ? 43 : 43 + 8, 0, 8, 8);
- if (SkyblockHud.config.main.twelveHourClock) drawScaledString(0.8f, width / 2, offset + (bossBarVisible ? 38 : 21), normalTime, (timeHour > 19 || timeHour < 6) ? 0xAFB8CC : 0xFFFF55); else drawCenteredString(font, militaryTime, (width / 2), offset + (bossBarVisible ? 38 : 21), (timeHour > 19 || timeHour < 4) ? 0xAFB8CC : 0xFFFF55);
+ if (LorenzMod.config.main.twelveHourClock) drawScaledString(0.8f, width / 2, offset + (bossBarVisible ? 38 : 21), normalTime, (timeHour > 19 || timeHour < 6) ? 0xAFB8CC : 0xFFFF55); else drawCenteredString(font, militaryTime, (width / 2), offset + (bossBarVisible ? 38 : 21), (timeHour > 19 || timeHour < 4) ? 0xAFB8CC : 0xFFFF55);
//PURSE
drawPurseAndBits(width, offset, mc);
@@ -302,12 +302,12 @@ public class OverlayHud extends Gui {
@SubscribeEvent
public void renderOverlay(RenderGameOverlayEvent.Post event) {
- if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard())) {
+ if (Utils.overlayShouldRender(event.type, LorenzMod.hasSkyblockScoreboard())) {
bossBarVisible = BossStatus.statusBarTime > 0 && GuiIngameForge.renderBossHealth && BossbarHandler.bossBarRendered;
Minecraft mc = Minecraft.getMinecraft();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
- if (LocationHandler.getCurrentLocation() != Locations.CATACOMBS && !SkyblockHud.config.main.disaleMainHud) {
- drawClock(event.resolution.getScaledWidth(), SkyblockHud.config.main.mainHudPos.getAbsY(event.resolution, 34), mc);
+ if (LocationHandler.getCurrentLocation() != Locations.CATACOMBS && !LorenzMod.config.main.disaleMainHud) {
+ drawClock(event.resolution.getScaledWidth(), LorenzMod.config.main.mainHudPos.getAbsY(event.resolution, 34), mc);
}
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
index 1c3cbb0ef..7ffb39b6f 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
@@ -1,7 +1,7 @@
package com.thatgravyboat.skyblockhud.overlay;
import com.mojang.realmsclient.gui.ChatFormatting;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.core.config.Position;
import com.thatgravyboat.skyblockhud.handlers.HeldItemHandler;
import com.thatgravyboat.skyblockhud.textures.Textures;
@@ -52,7 +52,7 @@ public class RPGHud extends Gui {
@SubscribeEvent
public void renderOverlay(RenderGameOverlayEvent.Post event) {
- if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), SkyblockHud.config.rpg.showRpgHud)) {
+ if (Utils.overlayShouldRender(event.type, LorenzMod.hasSkyblockScoreboard(), LorenzMod.config.rpg.showRpgHud)) {
Minecraft mc = Minecraft.getMinecraft();
GlStateManager.enableBlend();
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
@@ -62,12 +62,12 @@ public class RPGHud extends Gui {
}
mc.renderEngine.bindTexture(Textures.texture.playerStats);
- Position position = SkyblockHud.config.rpg.rpgHudPosition;
+ Position position = LorenzMod.config.rpg.rpgHudPosition;
int x = position.getAbsX(event.resolution, 120);
int y = position.getAbsY(event.resolution, 47);
- boolean rightAligned = position.rightAligned(event.resolution, 120) && SkyblockHud.config.rpg.flipHud;
+ boolean rightAligned = position.rightAligned(event.resolution, 120) && LorenzMod.config.rpg.flipHud;
drawTexturedModalRect(x, y, rightAligned ? 131 : 5, 6, 120, 47);
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
index f82c2f2e9..a6530b69d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.playerstats;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.overlay.MiningHud;
import com.thatgravyboat.skyblockhud.overlay.RPGHud;
import com.thatgravyboat.skyblockhud.utils.Utils;
@@ -43,7 +43,7 @@ public class ActionBarParsing {
public void tick(TickEvent.ClientTickEvent event) {
if (predict) {
ticksSinceLastPrediction++;
- if (ticksSinceLastPrediction == 20 && SkyblockHud.config.rpg.showRpgHud) {
+ if (ticksSinceLastPrediction == 20 && LorenzMod.config.rpg.showRpgHud) {
ticksSinceLastPrediction = 0;
RPGHud.manaPredictionUpdate(true, 0);
}
@@ -53,10 +53,10 @@ public class ActionBarParsing {
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onStatusBarHigh(ClientChatReceivedEvent event) {
if (event.type == 2) {
- if (SkyblockHud.hasSkyblockScoreboard() && SkyblockHud.config.rpg.showRpgHud) {
+ if (LorenzMod.hasSkyblockScoreboard() && LorenzMod.config.rpg.showRpgHud) {
parseActionBar(event.message.getUnformattedText());
}
- if (SkyblockHud.config.mining.showDrillBar) {
+ if (LorenzMod.config.mining.showDrillBar) {
String bar = Utils.removeColor(event.message.getUnformattedText());
Matcher DrillFuelMatcher = DrillFuelRegex.matcher(bar);
if (DrillFuelMatcher.find()) {
@@ -73,7 +73,7 @@ public class ActionBarParsing {
@SubscribeEvent(priority = EventPriority.LOW)
public void onStatusBarLow(ClientChatReceivedEvent event) {
if (event.type == 2) {
- if (SkyblockHud.hasSkyblockScoreboard() && SkyblockHud.config.rpg.showRpgHud) {
+ if (LorenzMod.hasSkyblockScoreboard() && LorenzMod.config.rpg.showRpgHud) {
String message = event.message.getUnformattedText();
if (lastLowEditedActionBar == null || !lastLowActionBar.equals(message)) {
lastLowActionBar = message;
@@ -82,7 +82,7 @@ public class ActionBarParsing {
message = DefenseReplaceRegex.matcher(message).replaceAll("");
message = ManaReplaceRegex.matcher(message).replaceAll("");
Matcher overflowMatcher = ManaOverflowReplaceRegex.matcher(message);
- if (overflowMatcher.find() && SkyblockHud.config.renderer.addOverflowMana) {
+ if (overflowMatcher.find() && LorenzMod.config.renderer.addOverflowMana) {
message = overflowMatcher.replaceAll("\u00A73\u02AC " + overflowMatcher.group(3));
}
@@ -90,7 +90,7 @@ public class ActionBarParsing {
}
event.message = lastLowEditedActionBar;
}
- if (SkyblockHud.config.mining.showDrillBar) {
+ if (LorenzMod.config.mining.showDrillBar) {
event.message = new ChatComponentText(DrillFuelReplaceRegex.matcher(event.message.getUnformattedText()).replaceAll("").trim());
}
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java b/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java
index c77bd40f8..ee122aef4 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/textures/Textures.java
@@ -5,7 +5,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 java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
@@ -26,7 +26,7 @@ public class Textures implements IResourceManagerReloadListener {
public static void setTexture(int selected) {
if (selected >= styles.size() || selected < 0) {
texture = DEFAULT_TEXTURE;
- SkyblockHud.config.misc.style = 0;
+ LorenzMod.config.misc.style = 0;
} else {
texture = styles.get(selected);
}
@@ -53,6 +53,6 @@ public class Textures implements IResourceManagerReloadListener {
}
} catch (Exception ignored) {}
- if (SkyblockHud.config != null) setTexture(SkyblockHud.config.misc.style);
+ if (LorenzMod.config != null) setTexture(LorenzMod.config.misc.style);
}
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerFileLoader.java b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerFileLoader.java
index 7401dd8c1..47764a543 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerFileLoader.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerFileLoader.java
@@ -1,7 +1,7 @@
package com.thatgravyboat.skyblockhud.tracker;
import com.google.gson.*;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.location.Locations;
import java.io.*;
import java.nio.charset.StandardCharsets;
@@ -83,7 +83,7 @@ public class TrackerFileLoader {
}
public static boolean loadTrackerStatsFile() {
- File configFile = new File(SkyblockHud.configDirectory, "sbh-trackers-stats.json");
+ File configFile = new File(LorenzMod.configDirectory, "sbh-trackers-stats.json");
try {
if (configFile.createNewFile()) {
@@ -121,7 +121,7 @@ public class TrackerFileLoader {
}
public static void saveTrackerStatsFile() {
- File configFile = new File(SkyblockHud.configDirectory, "sbh-trackers-stats.json");
+ File configFile = new File(LorenzMod.configDirectory, "sbh-trackers-stats.json");
try {
configFile.createNewFile();
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
index dc7ec1f63..d89ea1817 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.tracker;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import com.thatgravyboat.skyblockhud.api.events.SkyBlockEntityKilled;
import com.thatgravyboat.skyblockhud.location.LocationHandler;
import com.thatgravyboat.skyblockhud.location.Locations;
@@ -31,7 +31,7 @@ public class TrackerHandler extends Gui {
}
public static void onItemAdded(String id, int amount, String specialId, int number) {
- if (SkyblockHud.hasSkyblockScoreboard() && trackers.containsKey(LocationHandler.getCurrentLocation())) {
+ if (LorenzMod.hasSkyblockScoreboard() && trackers.containsKey(LocationHandler.getCurrentLocation())) {
Map<String, TrackerObject> trackerMap = trackers.get(LocationHandler.getCurrentLocation());
String dropId = id;
if (specialId != null) {
@@ -58,7 +58,7 @@ public class TrackerHandler extends Gui {
@SubscribeEvent
public void onSbEntityDeath(SkyBlockEntityKilled event) {
- if (SkyblockHud.hasSkyblockScoreboard() && trackers.containsKey(LocationHandler.getCurrentLocation())) {
+ if (LorenzMod.hasSkyblockScoreboard() && trackers.containsKey(LocationHandler.getCurrentLocation())) {
Map<String, TrackerObject> trackerMap = trackers.get(LocationHandler.getCurrentLocation());
if (trackerMap.containsKey("ENTITY:" + event.id)) {
TrackerObject object = trackerMap.get("ENTITY:" + event.id);
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java b/src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java
index 3135b9b29..5c4dceba0 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/utils/Utils.java
@@ -1,6 +1,6 @@
package com.thatgravyboat.skyblockhud.utils;
-import com.thatgravyboat.skyblockhud.SkyblockHud;
+import com.thatgravyboat.skyblockhud.LorenzMod;
import java.math.RoundingMode;
import java.nio.FloatBuffer;
import java.text.DecimalFormat;
@@ -32,11 +32,11 @@ import org.lwjgl.opengl.GL14;
public class Utils {
- private static LinkedList<Integer> guiScales = new LinkedList<>();
+ private static final LinkedList<Integer> guiScales = new LinkedList<>();
private static ScaledResolution lastScale = new ScaledResolution(Minecraft.getMinecraft());
//Labymod compatibility
- private static FloatBuffer projectionMatrixOld = BufferUtils.createFloatBuffer(16);
- private static FloatBuffer modelviewMatrixOld = BufferUtils.createFloatBuffer(16);
+ private static final FloatBuffer projectionMatrixOld = BufferUtils.createFloatBuffer(16);
+ private static final FloatBuffer modelviewMatrixOld = BufferUtils.createFloatBuffer(16);
public static String removeColor(String input) {
return input.replaceAll("(?i)\\u00A7.", "");
@@ -47,7 +47,7 @@ public class Utils {
}
public static boolean isPlayerHoldingRedstone(EntityPlayerSP player) {
- if (!SkyblockHud.config.main.requireRedstone) return true;
+ if (!LorenzMod.config.main.requireRedstone) return true;
ArrayList<Item> redstoneItems = new ArrayList<>(Arrays.asList(Items.redstone, Items.repeater, Items.comparator, Item.getByNameOrId("minecraft:redstone_torch")));
if (player.getHeldItem() != null) return redstoneItems.contains(player.getHeldItem().getItem());
return false;