Skip to content

Commit 80d5816

Browse files
authored
Merge pull request #40 from dshadowwolf/v3
Move JSON load to Init-Phase
2 parents f33127c + 86e1f9c commit 80d5816

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/com/mcmoddev/orespawn/OreSpawn.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class OreSpawn {
5252
public static final OS3Writer writer = new OS3Writer();
5353
public static final EventHandlers eventHandlers = new EventHandlers();
5454
public static final FeatureRegistry FEATURES = new FeatureRegistry();
55+
public static String OS1ConfigPath;
5556

5657
@EventHandler
5758
public void preInit(FMLPreInitializationEvent ev) {
@@ -65,16 +66,15 @@ public void preInit(FMLPreInitializationEvent ev) {
6566
MinecraftForge.ORE_GEN_BUS.register(eventHandlers);
6667
}
6768

68-
OS1Reader.loadEntries(Paths.get(ev.getSuggestedConfigurationFile().toPath().getParent().toString(),"orespawn"));
69-
OS2Reader.loadEntries();
70-
OS3Reader.loadEntries();
71-
69+
OS1ConfigPath = Paths.get(ev.getSuggestedConfigurationFile().toPath().getParent().toString(),"orespawn").toString();
7270
FMLInterModComms.sendFunctionMessage("orespawn", "api", "com.mcmoddev.orespawn.data.VanillaOrespawn");
7371
}
7472

7573
@EventHandler
7674
public void init(FMLInitializationEvent ev) {
77-
// nothing to do here, yet
75+
OS1Reader.loadEntries(Paths.get(OS1ConfigPath));
76+
OS2Reader.loadEntries();
77+
OS3Reader.loadEntries();
7878
}
7979

8080
@EventHandler

0 commit comments

Comments
 (0)