From 9de292c051e4089a2bd0962c85f7410c359d0259 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Tue, 12 Jul 2022 13:57:20 +0200 Subject: update to version 0.5 --- src/main/java/at/lorenz/mod/LorenzMod.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/lorenz/mod/LorenzMod.java b/src/main/java/at/lorenz/mod/LorenzMod.java index 352c8d56d..499813472 100644 --- a/src/main/java/at/lorenz/mod/LorenzMod.java +++ b/src/main/java/at/lorenz/mod/LorenzMod.java @@ -16,8 +16,6 @@ import at.lorenz.mod.test.LorenzTest; 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; @@ -27,11 +25,14 @@ 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.4.2"; + public static final String VERSION = "0.5"; // public static SBHConfig config; //TODO delete @@ -105,14 +106,16 @@ public class LorenzMod { 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) { @@ -130,7 +133,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 -- cgit