This repository was archived by the owner on Sep 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
src/main/java/org/localmc/tools/hardcodepatcher Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 11package org .localmc .tools .hardcodepatcher ;
22
33import com .mojang .logging .LogUtils ;
4- import net .fabricmc .fabric .api .event .EventFactory ;
54import org .localmc .tools .hardcodepatcher .command .CommandEventHandler ;
65import org .localmc .tools .hardcodepatcher .config .HardcodeTextPatcherConfig ;
76import org .localmc .tools .hardcodepatcher .config .HardcodeTextPatcherPatch ;
@@ -26,8 +25,25 @@ public class HardcodePatcher implements ModInitializer {
2625 @ Override
2726 public void onInitialize () {
2827 CommandRegistrationCallback .EVENT .register (CommandEventHandler ::registerClientCommands );
29- }
3028
29+ try {
30+ HardcodeTextPatcherConfig .readConfig ();
31+ List <String > mods = HardcodeTextPatcherConfig .getMods ();
32+ for (String mod : mods ) {
33+ HardcodeTextPatcherPatch vpp = new HardcodeTextPatcherPatch (mod + ".json" );
34+ try {
35+ vpp .readConfig ();
36+ vpps .add (vpp );
37+ } catch (IOException e ) {
38+ e .printStackTrace ();
39+ }
40+ }
41+ } catch (IOException e ) {
42+ LOGGER .error ("Failed to load config: " , e );
43+ throw new RuntimeException (e );
44+ }
45+ }
46+ /*
3147 public static void loadConfig() {
3248 try {
3349 HardcodeTextPatcherConfig.readConfig();
@@ -46,4 +62,5 @@ public static void loadConfig() {
4662 throw new RuntimeException(e);
4763 }
4864 }
65+ */
4966}
You can’t perform that action at this time.
0 commit comments