aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/lorenz/mod
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/lorenz/mod')
-rw-r--r--src/main/java/at/lorenz/mod/LorenzMod.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/main/java/at/lorenz/mod/LorenzMod.java b/src/main/java/at/lorenz/mod/LorenzMod.java
index b9f9d7ad6..fb6986293 100644
--- a/src/main/java/at/lorenz/mod/LorenzMod.java
+++ b/src/main/java/at/lorenz/mod/LorenzMod.java
@@ -12,6 +12,8 @@ import at.lorenz.mod.misc.CurrentPetDisplay;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.thatgravyboat.skyblockhud_2.commands.Commands;
+import java.io.*;
+import java.nio.charset.StandardCharsets;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.MinecraftForge;
@@ -21,16 +23,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 = LorenzMod.MODID, version = LorenzMod.VERSION)
public class LorenzMod {
public static final String MODID = "lorenzmod";
public static final String VERSION = "0.2.1";
-// public static SBHConfig config; //TODO delete
+ // public static SBHConfig config; //TODO delete
public static Features feature;
private File configFile;
@@ -85,22 +84,20 @@ 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) {
@@ -118,8 +115,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