mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-17 00:35:01 +00:00
config refactoring, configurable IDs for hardcoded mods.
This commit is contained in:
10 files changed
+138
-24
No files matched your search
@@ -1,5 +1,9 @@
|
||||
package com.falsepattern.endlessids.mixin.plugin;
|
||||
|
||||
import com.falsepattern.endlessids.config.DarkWorldIDConfig;
|
||||
import com.falsepattern.endlessids.config.FuturepackIDConfig;
|
||||
import com.falsepattern.lib.config.ConfigException;
|
||||
import com.falsepattern.lib.config.ConfigurationManager;
|
||||
import com.falsepattern.lib.mixin.ITargetedMod;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -19,12 +23,13 @@ public enum TargetedMod implements ITargetedMod {
|
||||
BIOMETWEAKER("Biome Tweaker", true, startsWith("biometweaker-")),
|
||||
BIOMEWAND("Biome Wand", true, startsWith("1.7.10-biome-wand-").or(startsWith("biome-wand"))),
|
||||
COFHLIB("CoFH Lib", true, startsWith("cofhlib-")),
|
||||
DARKWORLD("Dark World", true, startsWith("darkworld-")),
|
||||
DARKWORLD("Dark World", true, startsWith("darkworld-").and(loadConfig(DarkWorldIDConfig.class))),
|
||||
DRAGONAPI("DragonAPI", false, startsWith("dragonapi")),
|
||||
EB("Enhanced Biomes", true, startsWith("Enhanced Biomes").or(startsWith("enhancedbiomes"))),
|
||||
EREBUS("The Erebus", true, startsWith("theerebus")),
|
||||
EXTRAUTILITIES("Extra Utilities", true, startsWith("extrautilities-")),
|
||||
FUTUREPACK("Futurepack", true, startsWith("[1.7.10]futurepack").or(startsWith("futurepack-"))),
|
||||
FUTUREPACK("Futurepack", true, startsWith("[1.7.10]futurepack").or(startsWith("futurepack-")).and(loadConfig(
|
||||
FuturepackIDConfig.class))),
|
||||
GALACTICRAFTCORE("GalactiCraftCore", false, startsWith("galacticraftcore")),
|
||||
HIGHLANDS("Highlands", true, startsWith("highlands")),
|
||||
ICG("Immersive Cavegen", true, startsWith("immersivecavegen")),
|
||||
@@ -40,6 +45,17 @@ public enum TargetedMod implements ITargetedMod {
|
||||
WORLDEDIT("WorldEdit", false, startsWith("worldedit-")),
|
||||
;
|
||||
|
||||
private static Predicate<String> loadConfig(Class<?> configClass) {
|
||||
return (str) -> {
|
||||
try {
|
||||
ConfigurationManager.registerConfig(configClass);
|
||||
} catch (ConfigException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
@Getter
|
||||
private final String modName;
|
||||
@Getter
|
||||
|
||||
Reference in new issue
Block a user