diff options
author | boubou19 <miisterunknown@gmail.com> | 2024-08-27 20:50:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-27 18:50:30 +0000 |
commit | 4908d5967c3dfeff5616c65144e701859b9e30a2 (patch) | |
tree | 3e58a4b8ebd8b70745e81c4c71c765980e4ec4f4 /src/main/java/pers/gwyog/gtneioreplugin/Config.java | |
parent | 3c574facfb224029c0b69865e281023da6170ce0 (diff) | |
download | GT5-Unofficial-4908d5967c3dfeff5616c65144e701859b9e30a2.tar.gz GT5-Unofficial-4908d5967c3dfeff5616c65144e701859b9e30a2.tar.bz2 GT5-Unofficial-4908d5967c3dfeff5616c65144e701859b9e30a2.zip |
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
Diffstat (limited to 'src/main/java/pers/gwyog/gtneioreplugin/Config.java')
-rw-r--r-- | src/main/java/pers/gwyog/gtneioreplugin/Config.java | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/Config.java b/src/main/java/pers/gwyog/gtneioreplugin/Config.java index 8501ebabb1..ceced6a78e 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/Config.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/Config.java @@ -1,22 +1,28 @@ package pers.gwyog.gtneioreplugin; -import java.io.File; - -import net.minecraftforge.common.config.Configuration; - -import cpw.mods.fml.common.event.FMLPreInitializationEvent; - +@com.gtnewhorizon.gtnhlib.config.Config( + modid = GTNEIOrePlugin.MODID, + category = "general", + filename = GTNEIOrePlugin.MODID) public class Config { - public final Configuration tConfig; + @com.gtnewhorizon.gtnhlib.config.Config.Comment("if true, generate both csv files.") + @com.gtnewhorizon.gtnhlib.config.Config.DefaultBoolean(false) + @com.gtnewhorizon.gtnhlib.config.Config.RequiresMcRestart + public static boolean printCsv; + + @com.gtnewhorizon.gtnhlib.config.Config.Comment("the name of the file you want for the ore sheet, it'll appear at the root of your instance.") + @com.gtnewhorizon.gtnhlib.config.Config.DefaultString("GTNH-Oresheet.csv") + @com.gtnewhorizon.gtnhlib.config.Config.RequiresMcRestart + public static String CSVName; - public Config(FMLPreInitializationEvent preinit, String cfgname) { - File tFile = new File(preinit.getModConfigurationDirectory(), cfgname); - tConfig = new Configuration(tFile); - tConfig.load(); - } + @com.gtnewhorizon.gtnhlib.config.Config.Comment("the name of the file you want for the small ore sheet, it'll appear at the root of your instance.") + @com.gtnewhorizon.gtnhlib.config.Config.DefaultString("GTNH-Small-Ores-Sheet.csv") + @com.gtnewhorizon.gtnhlib.config.Config.RequiresMcRestart + public static String CSVnameSmall; - public void save() { - if (tConfig.hasChanged()) tConfig.save(); - } + @com.gtnewhorizon.gtnhlib.config.Config.Comment("Maximum number of lines the dimension names tooltip can have before it wraps around.") + @com.gtnewhorizon.gtnhlib.config.Config.DefaultInt(11) + @com.gtnewhorizon.gtnhlib.config.Config.RequiresMcRestart + public static int maxTooltipLines; } |