aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal00212 <hannibal00212@users.noreply.github.com>2022-07-08 10:31:51 +0000
committerGitHub Action <actions@github.com>2022-07-08 10:31:51 +0000
commit84363f5cb94fe287cc2509ae081fab540cdcd70e (patch)
treef7cc5de51cd5cf917ef2880283c07f01a64cfcf4
parentabd6c5d7275149a616ef9513e528eea270e526b5 (diff)
downloadskyhanni-84363f5cb94fe287cc2509ae081fab540cdcd70e.tar.gz
skyhanni-84363f5cb94fe287cc2509ae081fab540cdcd70e.tar.bz2
skyhanni-84363f5cb94fe287cc2509ae081fab540cdcd70e.zip
Prettified Code!
-rw-r--r--src/main/java/at/lorenz/mod/Features.java100
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java16
2 files changed, 54 insertions, 62 deletions
diff --git a/src/main/java/at/lorenz/mod/Features.java b/src/main/java/at/lorenz/mod/Features.java
index 2553f1d8d..0edf3273e 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, () -> {
- }, () -> {
- }, () -> SkyblockHud.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(SkyblockHud.config, activeConfig))));
+ Minecraft.getMinecraft().displayGuiScreen(new GuiPositionEditor(position, width, height, () -> {}, () -> {}, () -> SkyblockHud.screenToOpen = new GuiScreenElementWrapper(new SBHConfigEditor(SkyblockHud.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/SkyblockHud.java b/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
index 022317457..32835f9e9 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/SkyblockHud.java
@@ -15,6 +15,8 @@ import com.thatgravyboat.skyblockhud.commands.Commands;
import com.thatgravyboat.skyblockhud.config.SBHConfig;
import com.thatgravyboat.skyblockhud.textures.Textures;
import java.io.*;
+import java.io.*;
+import java.nio.charset.StandardCharsets;
import java.nio.charset.StandardCharsets;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
@@ -26,16 +28,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 {
public static final String MODID = "lorenzmod";
public static final String VERSION = "0.1";
- public static SBHConfig config;//TODO delete
+ public static SBHConfig config; //TODO delete
public static Features feature;
private File configFile;
@@ -47,7 +46,6 @@ public class SkyblockHud {
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
-
new BazaarApi();
MinecraftForge.EVENT_BUS.register(this);
@@ -101,8 +99,7 @@ public class SkyblockHud {
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) {
@@ -116,7 +113,7 @@ public class SkyblockHud {
// WarpHandler.save();
// }
//
- Runtime.getRuntime().addShutdownHook(new Thread(this::saveConfig));
+ Runtime.getRuntime().addShutdownHook(new Thread(this::saveConfig));
// Runtime.getRuntime().addShutdownHook(new Thread(TrackerFileLoader::saveTrackerStatsFile));
}
@@ -128,8 +125,7 @@ public class SkyblockHud {
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