From 4908d5967c3dfeff5616c65144e701859b9e30a2 Mon Sep 17 00:00:00 2001 From: boubou19 Date: Tue, 27 Aug 2024 20:50:30 +0200 Subject: Config/gregtech.cfg (#2939) * first pass on config migration * second pass on config migration * removing bad configs * rename config classes and register them * move debug options to its own debug category * migrate pollution * finish migrating general config * removing useless config * finish GregTech.cfg port to GTNHLib * don't accidentally force panic mode in dev env * typo * defaults are now handled by the confg handler * remove dead config * force config save after defaults are being written * stop messing with the GregTech.cfg externally * removing comments * new underground fluid builder and porting default underground fluids to code * move config handlers of gregtech.cfg in their own package * process MachineStats.cfg * yeeted MaterialProperties.cfg * remove unused compat in GTNH * process OverpoweredStuff.cfg * process Other.cfg * ungregify some config variables * remove unused variables * fix Ids.cfg not being populated * delete duplicate printing of MTE IDs in GT5U clients * bump hodgepodge version to get mod phase timers * process Client.cfg * fix bad category naming * registering all the config handlers in gui * bump GTNHLib version * actually only registering client configs * use proper double arrays now * move GT ore mixes to patternbuilders * dead code * fix multifiles config not being handled properly * import class from NHCore * removing reflection * use enums for registration * yeet config for Asteroid dimensions * remove unused since 2015 enum entry * todo * rework oremix enums * imported dimension data in enums * convert old dirty predicate into proper one * hook gagreg onto the OreMixes enum * finally nuke worldgen.ore.mix config category! * hook gagreg small ores onto the SmallOres enum * imported dim values in enum * fix dirty work around in vm predicate * yeet unused classes * hook GT stones to GTStones enum * yeet all the remaining booleans in the worldgen category * port endasteroids category * port general category * deprecated * yeet unused bw compat * finish worldgen config migration * hardcode config into code * remove not generated config entry * remove Unification.cfg * fix build * migrate oreveins away from config * migrate small ores away from config * delete config parser * forgotten * fix EoH recipe crash in dev * fix GT NEI Ore Plugin config and csv paths * shade opencsv * rewrite csv generator * spotless apply --- .../galacticgreg/registry/GalacticGregRegistry.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/main/java/bloodasp/galacticgreg/registry') diff --git a/src/main/java/bloodasp/galacticgreg/registry/GalacticGregRegistry.java b/src/main/java/bloodasp/galacticgreg/registry/GalacticGregRegistry.java index b45353da6e..cc0a8146ab 100644 --- a/src/main/java/bloodasp/galacticgreg/registry/GalacticGregRegistry.java +++ b/src/main/java/bloodasp/galacticgreg/registry/GalacticGregRegistry.java @@ -1,5 +1,7 @@ package bloodasp.galacticgreg.registry; +import static bloodasp.galacticgreg.api.enums.ModContainers.Vanilla; + import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -27,7 +29,7 @@ public class GalacticGregRegistry { /** * Register new ModContainer in the registry. Call this after you've populated it with Dimensions and Blocks Must be * called from your own PreInit or Init event - * + * * @param pModContainer * @return */ @@ -55,7 +57,7 @@ public class GalacticGregRegistry { /** * Lookup the registered dimensions and try to find the DimensionDefinition that has the ChunkProvider that we have * here - * + * * @param pChunkProvider * @return */ @@ -86,7 +88,7 @@ public class GalacticGregRegistry { /** * Get all registered modcontainers. Can only be done after the initialization process is done - * + * * @return */ public static Collection getModContainers() { @@ -113,8 +115,9 @@ public class GalacticGregRegistry { */ private static void InitModContainers() { for (ModContainer mc : _mModContainers.values()) { + // todo: rename Vanilla mod container name from "Vanilla" to "minecraft" if (!Loader.isModLoaded(mc.getModName()) && !mc.getModName() - .equalsIgnoreCase("vanilla")) { + .equals(Vanilla.modContainer.getModName())) { GalacticGreg.Logger.warn( "Ignoring ModRegistration for OreGen: [%s], because mod is not loaded. Did you misspell the name?", mc.getModName()); @@ -134,8 +137,7 @@ public class GalacticGregRegistry { .size()); // Register default generator if dimension is asteroid and no generator was added - if (md.getDimensionType() == DimensionType.AsteroidAndPlanet - || md.getDimensionType() == DimensionType.Asteroid) { + if (md.getDimensionType() == DimensionType.Asteroid) { if (md.getSpaceObjectGenerators() .size() == 0) { GalacticGreg.Logger.debug("No generators found, adding build-in ellipsoid generator"); @@ -156,7 +158,7 @@ public class GalacticGregRegistry { /** * Returns ModContainer for given DimensionDefinition - * + * * @param pDimensionDefinition * @return */ -- cgit