diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/lorenz/mod/Features.java | 100 | ||||
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/LorenzMod.java | 12 |
2 files changed, 53 insertions, 59 deletions
diff --git a/src/main/java/at/lorenz/mod/Features.java b/src/main/java/at/lorenz/mod/Features.java index 2aeed312c..f41359f87 100644 --- a/src/main/java/at/lorenz/mod/Features.java +++ b/src/main/java/at/lorenz/mod/Features.java @@ -15,62 +15,59 @@ import net.minecraft.client.Minecraft; public class Features extends Config { private void editOverlay(String activeConfig, int width, int height, Position position) { - Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> { - }, () -> { - }, () -> LorenzMod.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(LorenzMod.config, activeConfig)))); + Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> {}, () -> {}, () -> LorenzMod.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(LorenzMod.config, activeConfig)))); } @Override public void executeRunnable(String runnableId) { -// String activeConfigCategory = null; -// if (Minecraft.getMinecraft().currentScreen instanceof GuiScreenElementWrapper) { -// GuiScreenElementWrapper wrapper = (GuiScreenElementWrapper) Minecraft.getMinecraft().currentScreen; -// if (wrapper.element instanceof SBHConfigEditor) { -// activeConfigCategory = ((SBHConfigEditor) wrapper.element).getSelectedCategoryName(); -// } -// } -// -// switch (runnableId) { -// case "rpg": -// editOverlay(activeConfigCategory, 120, 47, rpg.rpgHudPosition); -// return; -// case "d1": -// editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer1); -// return; -// case "d2": -// editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer2); -// return; -// case "d3": -// editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer3); -// return; -// case "d4": -// editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer4); -// return; -// case "main": -// editOverlay(activeConfigCategory, 1000, 34, main.mainHudPos); -// return; -// case "ultimate": -// editOverlay(activeConfigCategory, 182, 5, dungeon.barPosition); -// return; -// case "map": -// editOverlay(activeConfigCategory, 72, 72, map.miniMapPosition); -// return; -// case "tracker": -// editOverlay(activeConfigCategory, 130, 70, trackers.trackerPosition); -// return; -// case "drill": -// editOverlay(activeConfigCategory, 136, 7, mining.drillBar); -// return; -// case "heat": -// editOverlay(activeConfigCategory, 45, 7, mining.heatBar); -// return; -// case "dialogue": -// editOverlay(activeConfigCategory, 182, 68, misc.dialoguePos); -// return; -// } + // String activeConfigCategory = null; + // if (Minecraft.getMinecraft().currentScreen instanceof GuiScreenElementWrapper) { + // GuiScreenElementWrapper wrapper = (GuiScreenElementWrapper) Minecraft.getMinecraft().currentScreen; + // if (wrapper.element instanceof SBHConfigEditor) { + // activeConfigCategory = ((SBHConfigEditor) wrapper.element).getSelectedCategoryName(); + // } + // } + // + // switch (runnableId) { + // case "rpg": + // editOverlay(activeConfigCategory, 120, 47, rpg.rpgHudPosition); + // return; + // case "d1": + // editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer1); + // return; + // case "d2": + // editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer2); + // return; + // case "d3": + // editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer3); + // return; + // case "d4": + // editOverlay(activeConfigCategory, 120, 32, dungeon.dungeonPlayer4); + // return; + // case "main": + // editOverlay(activeConfigCategory, 1000, 34, main.mainHudPos); + // return; + // case "ultimate": + // editOverlay(activeConfigCategory, 182, 5, dungeon.barPosition); + // return; + // case "map": + // editOverlay(activeConfigCategory, 72, 72, map.miniMapPosition); + // return; + // case "tracker": + // editOverlay(activeConfigCategory, 130, 70, trackers.trackerPosition); + // return; + // case "drill": + // editOverlay(activeConfigCategory, 136, 7, mining.drillBar); + // return; + // case "heat": + // editOverlay(activeConfigCategory, 45, 7, mining.heatBar); + // return; + // case "dialogue": + // editOverlay(activeConfigCategory, 182, 68, misc.dialoguePos); + // return; + // } } - @Expose @Category(name = "Chat", desc = "Chat related features.") public Chat chat = new Chat(); @@ -102,8 +99,7 @@ public class Features extends Config { public static class Inventory { @Expose - @ConfigOption(name = "Hide Not Clickable Items", desc = "Hide items that are not clickable in " + - "the current inventory: ah, bz, accessory bag, etc") + @ConfigOption(name = "Hide Not Clickable Items", desc = "Hide items that are not clickable in " + "the current inventory: ah, bz, accessory bag, etc") @ConfigEditorBoolean public boolean hideNotClickableItems = false; } diff --git a/src/main/java/com/thatgravyboat/skyblockhud/LorenzMod.java b/src/main/java/com/thatgravyboat/skyblockhud/LorenzMod.java index a07604db0..c17368f88 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/LorenzMod.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/LorenzMod.java @@ -33,7 +33,8 @@ public class LorenzMod { public static final String VERSION = "0.1"; @Deprecated - public static SBHConfig config;//TODO delete + public static SBHConfig config; //TODO delete + public static Features feature; private File configFile; @@ -45,7 +46,6 @@ public class LorenzMod { @EventHandler public void preInit(FMLPreInitializationEvent event) { - new BazaarApi(); MinecraftForge.EVENT_BUS.register(this); @@ -99,8 +99,7 @@ public class LorenzMod { if (configFile.exists()) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8))) { feature = gson.fromJson(reader, Features.class); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } if (feature == null) { @@ -114,7 +113,7 @@ public class LorenzMod { // WarpHandler.save(); // } // - Runtime.getRuntime().addShutdownHook(new Thread(this::saveConfig)); + Runtime.getRuntime().addShutdownHook(new Thread(this::saveConfig)); // Runtime.getRuntime().addShutdownHook(new Thread(TrackerFileLoader::saveTrackerStatsFile)); } @@ -126,8 +125,7 @@ public class LorenzMod { try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(configFile), StandardCharsets.UTF_8))) { writer.write(gson.toJson(feature)); } - } catch (IOException ignored) { - } + } catch (IOException ignored) {} } // @EventHandler |