diff options
author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-08 16:02:54 +0200 |
---|---|---|
committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-08 16:02:54 +0200 |
commit | 9e08dbf2baa9819abd281ad285df7462c99491e2 (patch) | |
tree | 6e874e1c5b74a522d6acca08dd6b64c808ddbbbe /src/main/java/at/lorenz | |
parent | 1e268208cd700b379952d1718dca66fa4aad305c (diff) | |
download | skyhanni-9e08dbf2baa9819abd281ad285df7462c99491e2.tar.gz skyhanni-9e08dbf2baa9819abd281ad285df7462c99491e2.tar.bz2 skyhanni-9e08dbf2baa9819abd281ad285df7462c99491e2.zip |
remove old stuff
Diffstat (limited to 'src/main/java/at/lorenz')
-rw-r--r-- | src/main/java/at/lorenz/mod/LorenzMod.java | 21 | ||||
-rw-r--r-- | src/main/java/at/lorenz/mod/config/Features.java | 6 |
2 files changed, 13 insertions, 14 deletions
diff --git a/src/main/java/at/lorenz/mod/LorenzMod.java b/src/main/java/at/lorenz/mod/LorenzMod.java index 0e0d625f8..75396d94d 100644 --- a/src/main/java/at/lorenz/mod/LorenzMod.java +++ b/src/main/java/at/lorenz/mod/LorenzMod.java @@ -11,10 +11,6 @@ import at.lorenz.mod.dungeon.DungeonHighlightClickedBlocks; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.thatgravyboat.skyblockhud.commands.Commands; -import com.thatgravyboat.skyblockhud.config.SBHConfig; -import com.thatgravyboat.skyblockhud.textures.Textures; -import java.io.*; -import java.nio.charset.StandardCharsets; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.resources.IReloadableResourceManager; @@ -25,14 +21,16 @@ 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 = LorenzMod.MODID, version = LorenzMod.VERSION) public class LorenzMod { public static final String MODID = "lorenzmod"; public static final String VERSION = "0.2.1"; - @Deprecated - public static SBHConfig config; //TODO delete +// public static SBHConfig config; //TODO delete public static Features feature; private File configFile; @@ -86,20 +84,22 @@ public class LorenzMod { // // ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new NpcDialogue()); - ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new Textures()); +// ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new Textures()); // configDirectory = new File("mods/LorenzMod/config"); try { //noinspection ResultOfMethodCallIgnored configDirectory.mkdir(); - } catch (Exception ignored) {} + } catch (Exception ignored) { + } configFile = new File(configDirectory, "config.json"); 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) { @@ -125,7 +125,8 @@ 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 diff --git a/src/main/java/at/lorenz/mod/config/Features.java b/src/main/java/at/lorenz/mod/config/Features.java index c35639491..e195f1d1b 100644 --- a/src/main/java/at/lorenz/mod/config/Features.java +++ b/src/main/java/at/lorenz/mod/config/Features.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.Expose; import at.lorenz.mod.LorenzMod; import com.thatgravyboat.skyblockhud.config.SBHConfigEditor; import com.thatgravyboat.skyblockhud.core.GuiScreenElementWrapper; -import com.thatgravyboat.skyblockhud.core.config.Config; import com.thatgravyboat.skyblockhud.core.config.Position; import com.thatgravyboat.skyblockhud.core.config.annotations.Category; import com.thatgravyboat.skyblockhud.core.config.annotations.ConfigEditorBoolean; @@ -12,13 +11,12 @@ import com.thatgravyboat.skyblockhud.core.config.annotations.ConfigOption; import com.thatgravyboat.skyblockhud.core.config.gui.GuiPositionEditor; import net.minecraft.client.Minecraft; -public class Features extends Config { +public class Features { 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.feature, activeConfig)))); } - @Override public void executeRunnable(String runnableId) { // String activeConfigCategory = null; // if (Minecraft.getMinecraft().currentScreen instanceof GuiScreenElementWrapper) { |