miscellaneous fixes to make stuff *just work*

This commit is contained in:
FalsePattern committed 2022-07-13 22:02:45 +02:00
1 parent 86f9e54251
commit 600c28edbb
9 files changed
+146 -2

No files matched your search

@@ -19,6 +19,22 @@ public class CommonManager {
patches.add(new Futurepack());
}
@SneakyThrows
public final void construct() {
for (val patch : patches) {
if (Loader.isModLoaded(patch.modid)) {
try {
if (patch.construct()) {
EndlessIDs.LOG.info("Applied preInit patches for " + patch.modid);
}
} catch (Exception e) {
EndlessIDs.LOG.fatal("Failed to apply preInit patches for " + patch.modid, e);
throw e;
}
}
}
}
@SneakyThrows
public final void preInit() {
for (val patch : patches) {
@@ -6,6 +6,11 @@ import lombok.RequiredArgsConstructor;
public class Patch {
public final String modid;
@SuppressWarnings("RedundantThrows")
public boolean construct() throws Exception {
return false;
}
@SuppressWarnings("RedundantThrows")
public boolean preInit() throws Exception {
return false;
@@ -8,7 +8,7 @@ public class Futurepack extends Patch {
}
@Override
public boolean init() throws Exception {
public boolean construct() throws Exception {
Class.forName("futurepack.common.dim.BiomeGenSpace");
return true;
}