From 1ca41f88d7729d9279df71cd186ff86f22e7d515 Mon Sep 17 00:00:00 2001 From: Roman / Nea Date: Fri, 6 May 2022 16:13:36 +0200 Subject: Item Shop Recipes (#118) * first draft of item shop PR * add teleporter navigation because i can * fix teleporter navigation because apparently i cant * navigation gui basics * :pushpin: and removed some unused shit and added myself to devtest command * track / untrack + ery texture Co-Authored-By: RayDeeUx <51521765+RayDeeUx@users.noreply.github.com> * consoom the event * fix crash in ItemShopRecipe.java + fetch repository * i am so sorry jani * on second thought, this entire thing was a bit untested * more recipe stuff * make navigation actually good * make pins dissapear if you not a waypoint * npc parsing * save file * different file saving * remove message * Warping... (to deez nuts) * move shit around Co-authored-by: jani270 Co-authored-by: RayDeeUx <51521765+RayDeeUx@users.noreply.github.com> Co-authored-by: Lulonaut --- .../notenoughupdates/commands/repo/ReloadRepoCommand.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java index e363b59f..c4ef8c2c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java @@ -3,7 +3,6 @@ package io.github.moulberry.notenoughupdates.commands.repo; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.commands.ClientCommandBase; import io.github.moulberry.notenoughupdates.options.NEUConfig; -import io.github.moulberry.notenoughupdates.util.Constants; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; @@ -20,9 +19,11 @@ public class ReloadRepoCommand extends ClientCommandBase { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { - NotEnoughUpdates.INSTANCE.manager.reloadRepository(); - Constants.reload(); - + if (args.length > 1 && args[0].equals("fetch")) { + NotEnoughUpdates.INSTANCE.manager.fetchRepository(); + } else { + NotEnoughUpdates.INSTANCE.manager.reloadRepository(); + } NotEnoughUpdates.INSTANCE.newConfigFile(); if (NotEnoughUpdates.INSTANCE.getConfigFile().exists()) { try ( -- cgit From a6546a1abe954b394c40be58d73d6fb03d93709e Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sat, 28 May 2022 15:53:16 +0000 Subject: added config saving (#149) * i am unsure why this was here but it doesnt seem needed * saving config when closing menus with configs * Chatting --- .../notenoughupdates/commands/repo/ReloadRepoCommand.java | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java index c4ef8c2c..7e58088f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java @@ -24,17 +24,5 @@ public class ReloadRepoCommand extends ClientCommandBase { } else { NotEnoughUpdates.INSTANCE.manager.reloadRepository(); } - NotEnoughUpdates.INSTANCE.newConfigFile(); - if (NotEnoughUpdates.INSTANCE.getConfigFile().exists()) { - try ( - BufferedReader reader = new BufferedReader(new InputStreamReader( - new FileInputStream(NotEnoughUpdates.INSTANCE.getConfigFile()), - StandardCharsets.UTF_8 - )) - ) { - NotEnoughUpdates.INSTANCE.config = NotEnoughUpdates.INSTANCE.manager.gson.fromJson(reader, NEUConfig.class); - } catch (Exception ignored) { - } - } } } -- cgit From dfdc2d9519556dfec528ab9d1732cdf32aab0639 Mon Sep 17 00:00:00 2001 From: Roman / Nea Date: Tue, 31 May 2022 20:53:26 +0200 Subject: Move repository related configuration to GUI. (#151) --- .../commands/repo/ReloadRepoCommand.java | 28 ---------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java deleted file mode 100644 index 7e58088f..00000000 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/ReloadRepoCommand.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.github.moulberry.notenoughupdates.commands.repo; - -import io.github.moulberry.notenoughupdates.NotEnoughUpdates; -import io.github.moulberry.notenoughupdates.commands.ClientCommandBase; -import io.github.moulberry.notenoughupdates.options.NEUConfig; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; - -import java.io.BufferedReader; -import java.io.FileInputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; - -public class ReloadRepoCommand extends ClientCommandBase { - - public ReloadRepoCommand() { - super("neureloadrepo"); - } - - @Override - public void processCommand(ICommandSender sender, String[] args) throws CommandException { - if (args.length > 1 && args[0].equals("fetch")) { - NotEnoughUpdates.INSTANCE.manager.fetchRepository(); - } else { - NotEnoughUpdates.INSTANCE.manager.reloadRepository(); - } - } -} -- cgit