mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-16 22:15:01 +00:00
miscellaneous fixes to make stuff *just work*
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user