From dbc10704fdbff100d1ae592aa0ddf1dc8b1aeca0 Mon Sep 17 00:00:00 2001 From: boubou19 Date: Thu, 12 Sep 2024 22:30:04 +0200 Subject: Merge config categories (#3152) Co-authored-by: miozune Co-authored-by: Martin Robertz --- src/main/java/gregtech/GTMod.java | 52 +- src/main/java/gregtech/api/GregTechAPI.java | 5 - src/main/java/gregtech/api/enums/Materials.java | 8 +- .../metatileentity/implementations/MTEFluid.java | 4 +- .../implementations/MTEMultiBlockBase.java | 14 +- .../java/gregtech/api/recipe/RecipeCategories.java | 29 +- .../java/gregtech/api/recipe/RecipeCategory.java | 14 +- .../gregtech/api/recipe/RecipeCategoryHolder.java | 13 - .../gregtech/api/recipe/RecipeCategorySetting.java | 20 - .../java/gregtech/api/util/GTClientPreference.java | 11 +- .../java/gregtech/client/GTGUIClientConfig.java | 19 +- src/main/java/gregtech/common/GTClient.java | 2 +- src/main/java/gregtech/common/GTProxy.java | 10 +- .../java/gregtech/common/GTWorldgenerator.java | 10 +- src/main/java/gregtech/common/config/Client.java | 245 ++++++++ src/main/java/gregtech/common/config/Gregtech.java | 685 +++++++++++++++++++++ .../java/gregtech/common/config/MachineStats.java | 169 +++++ src/main/java/gregtech/common/config/OPStuff.java | 48 ++ src/main/java/gregtech/common/config/Other.java | 24 + src/main/java/gregtech/common/config/Worldgen.java | 80 +++ .../config/client/ConfigColorModulation.java | 25 - .../common/config/client/ConfigInterface.java | 29 - .../common/config/client/ConfigPreference.java | 21 - .../common/config/client/ConfigRender.java | 46 -- .../gregtech/common/config/client/ConfigWaila.java | 21 - .../common/config/gregtech/ConfigDebug.java | 79 --- .../common/config/gregtech/ConfigFeatures.java | 34 - .../common/config/gregtech/ConfigGeneral.java | 254 -------- .../common/config/gregtech/ConfigHarvestLevel.java | 28 - .../common/config/gregtech/ConfigMachines.java | 147 ----- .../config/gregtech/ConfigOreDropBehavior.java | 24 - .../common/config/gregtech/ConfigPollution.java | 129 ---- .../machinestats/ConfigBronzeSolarBoiler.java | 32 - .../common/config/machinestats/ConfigMachines.java | 34 - .../config/machinestats/ConfigMassFabricator.java | 33 - .../ConfigMicrowaveEnergyTransmitter.java | 28 - .../machinestats/ConfigSteelSolarBoiler.java | 32 - .../config/machinestats/ConfigTeleporter.java | 28 - .../common/config/opstuff/ConfigGeneral.java | 48 -- .../common/config/other/ConfigGeneral.java | 24 - .../common/config/worldgen/ConfigEndAsteroids.java | 33 - .../common/config/worldgen/ConfigGeneral.java | 48 -- .../gregtech/common/items/MetaGeneratedItem01.java | 4 +- .../items/behaviors/BehaviourSprayColor.java | 6 +- .../behaviors/BehaviourSprayColorInfinite.java | 6 +- .../tileentities/boilers/MTEBoilerSolar.java | 10 +- .../tileentities/boilers/MTEBoilerSolarSteel.java | 10 +- .../generators/MTEMagicalEnergyAbsorber.java | 4 +- .../machines/basic/MTEMassfabricator.java | 10 +- .../basic/MTEMicrowaveEnergyTransmitter.java | 11 +- .../tileentities/machines/basic/MTETeleporter.java | 8 +- .../java/gregtech/loaders/preload/GTPreLoad.java | 404 ++++++------ .../java/gregtech/nei/GTNEIDefaultHandler.java | 14 +- 53 files changed, 1547 insertions(+), 1579 deletions(-) delete mode 100644 src/main/java/gregtech/api/recipe/RecipeCategoryHolder.java create mode 100644 src/main/java/gregtech/common/config/Client.java create mode 100644 src/main/java/gregtech/common/config/Gregtech.java create mode 100644 src/main/java/gregtech/common/config/MachineStats.java create mode 100644 src/main/java/gregtech/common/config/OPStuff.java create mode 100644 src/main/java/gregtech/common/config/Other.java create mode 100644 src/main/java/gregtech/common/config/Worldgen.java delete mode 100644 src/main/java/gregtech/common/config/client/ConfigColorModulation.java delete mode 100644 src/main/java/gregtech/common/config/client/ConfigInterface.java delete mode 100644 src/main/java/gregtech/common/config/client/ConfigPreference.java delete mode 100644 src/main/java/gregtech/common/config/client/ConfigRender.java delete mode 100644 src/main/java/gregtech/common/config/client/ConfigWaila.java delete mode 100644 src/main/java/gregtech/common/config/gregtech/ConfigDebug.java delete mode 100644 src/main/java/gregtech/common/config/gregtech/ConfigFeatures.java delete mode 100644 src/main/java/gregtech/common/config/gregtech/ConfigGeneral.java delete mode 100644 src/main/java/gregtech/common/config/gregtech/ConfigHarvestLevel.java delete mode 100644 src/main/java/gregtech/common/config/gregtech/ConfigMachines.java delete mode 100644 src/main/java/gregtech/common/config/gregtech/ConfigOreDropBehavior.java delete mode 100644 src/main/java/gregtech/common/config/gregtech/ConfigPollution.java delete mode 100644 src/main/java/gregtech/common/config/machinestats/ConfigBronzeSolarBoiler.java delete mode 100644 src/main/java/gregtech/common/config/machinestats/ConfigMachines.java delete mode 100644 src/main/java/gregtech/common/config/machinestats/ConfigMassFabricator.java delete mode 100644 src/main/java/gregtech/common/config/machinestats/ConfigMicrowaveEnergyTransmitter.java delete mode 100644 src/main/java/gregtech/common/config/machinestats/ConfigSteelSolarBoiler.java delete mode 100644 src/main/java/gregtech/common/config/machinestats/ConfigTeleporter.java delete mode 100644 src/main/java/gregtech/common/config/opstuff/ConfigGeneral.java delete mode 100644 src/main/java/gregtech/common/config/other/ConfigGeneral.java delete mode 100644 src/main/java/gregtech/common/config/worldgen/ConfigEndAsteroids.java delete mode 100644 src/main/java/gregtech/common/config/worldgen/ConfigGeneral.java (limited to 'src/main/java/gregtech') diff --git a/src/main/java/gregtech/GTMod.java b/src/main/java/gregtech/GTMod.java index 3434d1bbbd..9861d35fcf 100644 --- a/src/main/java/gregtech/GTMod.java +++ b/src/main/java/gregtech/GTMod.java @@ -81,24 +81,12 @@ import gregtech.common.GTDummyWorld; import gregtech.common.GTNetwork; import gregtech.common.GTProxy; import gregtech.common.RecipeAdder; -import gregtech.common.config.client.ConfigColorModulation; -import gregtech.common.config.client.ConfigInterface; -import gregtech.common.config.client.ConfigPreference; -import gregtech.common.config.client.ConfigRender; -import gregtech.common.config.client.ConfigWaila; -import gregtech.common.config.gregtech.ConfigDebug; -import gregtech.common.config.gregtech.ConfigFeatures; -import gregtech.common.config.gregtech.ConfigGeneral; -import gregtech.common.config.gregtech.ConfigHarvestLevel; -import gregtech.common.config.gregtech.ConfigMachines; -import gregtech.common.config.gregtech.ConfigOreDropBehavior; -import gregtech.common.config.gregtech.ConfigPollution; -import gregtech.common.config.machinestats.ConfigBronzeSolarBoiler; -import gregtech.common.config.machinestats.ConfigMassFabricator; -import gregtech.common.config.machinestats.ConfigMicrowaveEnergyTransmitter; -import gregtech.common.config.machinestats.ConfigSteelSolarBoiler; -import gregtech.common.config.machinestats.ConfigTeleporter; -import gregtech.common.config.worldgen.ConfigEndAsteroids; +import gregtech.common.config.Client; +import gregtech.common.config.Gregtech; +import gregtech.common.config.MachineStats; +import gregtech.common.config.OPStuff; +import gregtech.common.config.Other; +import gregtech.common.config.Worldgen; import gregtech.common.covers.CoverFacadeAE; import gregtech.common.misc.GTCommand; import gregtech.common.misc.spaceprojects.commands.SPCommand; @@ -190,38 +178,22 @@ public class GTMod implements IGTMod { static { try { // Client - ConfigurationManager.registerConfig(ConfigColorModulation.class); - ConfigurationManager.registerConfig(ConfigInterface.class); - ConfigurationManager.registerConfig(ConfigPreference.class); - ConfigurationManager.registerConfig(ConfigRender.class); - ConfigurationManager.registerConfig(ConfigWaila.class); + ConfigurationManager.registerConfig(Client.class); // GregTech.cfg - ConfigurationManager.registerConfig(ConfigDebug.class); - ConfigurationManager.registerConfig(ConfigFeatures.class); - ConfigurationManager.registerConfig(ConfigGeneral.class); - ConfigurationManager.registerConfig(ConfigHarvestLevel.class); - ConfigurationManager.registerConfig(ConfigMachines.class); - ConfigurationManager.registerConfig(ConfigOreDropBehavior.class); - ConfigurationManager.registerConfig(ConfigPollution.class); + ConfigurationManager.registerConfig(Gregtech.class); // MachineStats.cfg - ConfigurationManager.registerConfig(ConfigBronzeSolarBoiler.class); - ConfigurationManager.registerConfig(gregtech.common.config.machinestats.ConfigMachines.class); - ConfigurationManager.registerConfig(ConfigMassFabricator.class); - ConfigurationManager.registerConfig(ConfigMicrowaveEnergyTransmitter.class); - ConfigurationManager.registerConfig(ConfigSteelSolarBoiler.class); - ConfigurationManager.registerConfig(ConfigTeleporter.class); + ConfigurationManager.registerConfig(MachineStats.class); // OverPoweredStuff - ConfigurationManager.registerConfig(gregtech.common.config.opstuff.ConfigGeneral.class); + ConfigurationManager.registerConfig(OPStuff.class); // Other - ConfigurationManager.registerConfig(gregtech.common.config.other.ConfigGeneral.class); + ConfigurationManager.registerConfig(Other.class); // WorldGeneration - ConfigurationManager.registerConfig(ConfigEndAsteroids.class); - ConfigurationManager.registerConfig(gregtech.common.config.worldgen.ConfigGeneral.class); + ConfigurationManager.registerConfig(Worldgen.class); } catch (ConfigException e) { throw new RuntimeException(e); diff --git a/src/main/java/gregtech/api/GregTechAPI.java b/src/main/java/gregtech/api/GregTechAPI.java index e9cfe16237..c485c8e47e 100644 --- a/src/main/java/gregtech/api/GregTechAPI.java +++ b/src/main/java/gregtech/api/GregTechAPI.java @@ -56,7 +56,6 @@ import gregtech.api.threads.RunnableMachineUpdate; import gregtech.api.util.CircuitryBehavior; import gregtech.api.util.CoverBehavior; import gregtech.api.util.CoverBehaviorBase; -import gregtech.api.util.GTConfig; import gregtech.api.util.GTCreativeTab; import gregtech.api.util.GTLog; import gregtech.api.util.GTModHandler; @@ -221,10 +220,6 @@ public class GregTechAPI { */ @SideOnly(Side.CLIENT) public static IIconRegister sBlockIcons, sItemIcons; - /** - * The Configuration Objects - */ - public static GTConfig NEIClientFIle; public static int TICKS_FOR_LAG_AVERAGING = 25, MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100; /** diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 9ad86df256..cd3c376004 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -34,7 +34,7 @@ import gregtech.api.interfaces.ISubTagContainer; import gregtech.api.objects.MaterialStack; import gregtech.api.util.GTOreDictUnificator; import gregtech.api.util.GTUtility; -import gregtech.common.config.gregtech.ConfigHarvestLevel; +import gregtech.common.config.Gregtech; import gregtech.common.render.items.CosmicNeutroniumRenderer; import gregtech.common.render.items.GaiaSpiritRenderer; import gregtech.common.render.items.GeneratedMaterialRenderer; @@ -2670,9 +2670,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void addHarvestLevels() { - GTMod.gregtechproxy.mChangeHarvestLevels = ConfigHarvestLevel.activateHarvestLevelChange; - GTMod.gregtechproxy.mMaxHarvestLevel = Math.min(15, ConfigHarvestLevel.maxHarvestLevel); - GTMod.gregtechproxy.mGraniteHavestLevel = ConfigHarvestLevel.graniteHarvestLevel; + GTMod.gregtechproxy.mChangeHarvestLevels = Gregtech.harvestLevel.activateHarvestLevelChange; + GTMod.gregtechproxy.mMaxHarvestLevel = Math.min(15, Gregtech.harvestLevel.maxHarvestLevel); + GTMod.gregtechproxy.mGraniteHavestLevel = Gregtech.harvestLevel.graniteHarvestLevel; } public static void initMaterialProperties() { diff --git a/src/main/java/gregtech/api/metatileentity/implementations/MTEFluid.java b/src/main/java/gregtech/api/metatileentity/implementations/MTEFluid.java index ddc0e28723..2613aa23c0 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/MTEFluid.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/MTEFluid.java @@ -64,7 +64,7 @@ import gregtech.api.util.GTUtility; import gregtech.api.util.ISerializableObject; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; import gregtech.common.GTClient; -import gregtech.common.config.other.ConfigGeneral; +import gregtech.common.config.Other; import gregtech.common.covers.CoverDrain; import gregtech.common.covers.CoverFluidRegulator; import gregtech.common.covers.CoverInfo; @@ -504,7 +504,7 @@ public class MTEFluid extends MetaPipeEntity { boolean wasActionPerformed = false; - int limit = ConfigGeneral.pipeWrenchingChainRange; + int limit = Other.pipeWrenchingChainRange; for (int connected = 0; connected < limit; connected++) { TileEntity nextPipeBaseTile = currentPipeBase.getTileEntityAtSide(tSide); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java index 8cdcd6e18f..a6526ac6fa 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java @@ -96,7 +96,7 @@ import gregtech.api.util.shutdown.ShutDownReason; import gregtech.api.util.shutdown.ShutDownReasonRegistry; import gregtech.client.GTSoundLoop; import gregtech.common.Pollution; -import gregtech.common.config.machinestats.ConfigMachines; +import gregtech.common.config.MachineStats; import gregtech.common.gui.modularui.widget.CheckRecipeResultSyncer; import gregtech.common.gui.modularui.widget.ShutDownReasonSyncer; import gregtech.common.items.MetaGeneratedTool01; @@ -172,9 +172,9 @@ public abstract class MTEMultiBlockBase extends MetaTileEntity public MTEMultiBlockBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 2); this.processingLogic = null; - MTEMultiBlockBase.disableMaintenance = ConfigMachines.disableMaintenanceChecks; - this.damageFactorLow = ConfigMachines.damageFactorLow; - this.damageFactorHigh = ConfigMachines.damageFactorHigh; + MTEMultiBlockBase.disableMaintenance = MachineStats.machines.disableMaintenanceChecks; + this.damageFactorLow = MachineStats.machines.damageFactorLow; + this.damageFactorHigh = MachineStats.machines.damageFactorHigh; this.mNEI = ""; if (!shouldCheckMaintenance()) fixAllIssues(); } @@ -182,9 +182,9 @@ public abstract class MTEMultiBlockBase extends MetaTileEntity public MTEMultiBlockBase(String aName) { super(aName, 2); this.processingLogic = createProcessingLogic(); - MTEMultiBlockBase.disableMaintenance = ConfigMachines.disableMaintenanceChecks; - this.damageFactorLow = ConfigMachines.damageFactorLow; - this.damageFactorHigh = ConfigMachines.damageFactorHigh; + MTEMultiBlockBase.disableMaintenance = MachineStats.machines.disableMaintenanceChecks; + this.damageFactorLow = MachineStats.machines.damageFactorLow; + this.damageFactorHigh = MachineStats.machines.damageFactorHigh; if (!shouldCheckMaintenance()) fixAllIssues(); } diff --git a/src/main/java/gregtech/api/recipe/RecipeCategories.java b/src/main/java/gregtech/api/recipe/RecipeCategories.java index 61eed8a8d7..3112fce705 100644 --- a/src/main/java/gregtech/api/recipe/RecipeCategories.java +++ b/src/main/java/gregtech/api/recipe/RecipeCategories.java @@ -3,69 +3,80 @@ package gregtech.api.recipe; import static gregtech.api.enums.Mods.GregTech; import static gregtech.api.recipe.RecipeCategory.createIcon; +import gregtech.api.enums.Mods; +import gregtech.common.config.Client; +import gtPlusPlus.api.recipe.GTPPRecipeMaps; + @SuppressWarnings("unused") public final class RecipeCategories { - @RecipeCategoryHolder public static final RecipeCategory arcFurnaceRecycling = new RecipeCategory( "gt.recipe.category.arc_furnace_recycling", RecipeMaps.arcFurnaceRecipes, + () -> Client.nei.recipeCategories.arcFurnaceRecycling, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "arc_furnace_recycling.png")))); - @RecipeCategoryHolder public static final RecipeCategory plasmaArcFurnaceRecycling = new RecipeCategory( "gt.recipe.category.plasma_arc_furnace_recycling", RecipeMaps.plasmaArcFurnaceRecipes, + () -> Client.nei.recipeCategories.plasmaArcFurnaceRecycling, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "plasma_arc_furnace_recycling.png")))); - @RecipeCategoryHolder public static final RecipeCategory maceratorRecycling = new RecipeCategory( "gt.recipe.category.macerator_recycling", RecipeMaps.maceratorRecipes, + () -> Client.nei.recipeCategories.maceratorRecycling, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "macerator_recycling.png")))); - @RecipeCategoryHolder public static final RecipeCategory fluidExtractorRecycling = new RecipeCategory( "gt.recipe.category.fluid_extractor_recycling", RecipeMaps.fluidExtractionRecipes, + () -> Client.nei.recipeCategories.fluidExtractorRecycling, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "fluid_extractor_recycling.png")))); - @RecipeCategoryHolder public static final RecipeCategory alloySmelterRecycling = new RecipeCategory( "gt.recipe.category.alloy_smelter_recycling", RecipeMaps.alloySmelterRecipes, + () -> Client.nei.recipeCategories.alloySmelterRecycling, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "alloy_smelter_recycling.png")))); - @RecipeCategoryHolder public static final RecipeCategory alloySmelterMolding = new RecipeCategory( "gt.recipe.category.alloy_smelter_molding", RecipeMaps.alloySmelterRecipes, + () -> Client.nei.recipeCategories.alloySmelterMolding, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "alloy_smelter_molding.png")))); - @RecipeCategoryHolder public static final RecipeCategory forgeHammerRecycling = new RecipeCategory( "gt.recipe.category.forge_hammer_recycling", RecipeMaps.hammerRecipes, + () -> Client.nei.recipeCategories.forgeHammerRecycling, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "forge_hammer_recycling.png")))); - @RecipeCategoryHolder public static final RecipeCategory ticPartExtruding = new RecipeCategory( "gt.recipe.category.tic_part_extruding", RecipeMaps.extruderRecipes, + () -> Client.nei.recipeCategories.ticPartExtruding, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "tic_part_extruding.png")))); - @RecipeCategoryHolder public static final RecipeCategory ticBoltMolding = new RecipeCategory( "gt.recipe.category.tic_bolt_molding", RecipeMaps.fluidSolidifierRecipes, + () -> Client.nei.recipeCategories.ticBoltMolding, builder -> builder.setDisplayImage( createIcon(GregTech.getResourcePath("textures", "gui", "picture", "tic_bolt_molding.png")))); + + public static final RecipeCategory absNonAlloyRecipes = new RecipeCategory( + "gtpp.recipe.category.abs_non_alloy_recipes", + GTPPRecipeMaps.alloyBlastSmelterRecipes, + () -> Client.nei.recipeCategories.absNonAlloyRecipes, + builder -> builder.setDisplayImage( + createIcon(Mods.GTPlusPlus.getResourcePath("textures", "gui", "picture", "abs_non_alloy_recipes.png")))); } diff --git a/src/main/java/gregtech/api/recipe/RecipeCategory.java b/src/main/java/gregtech/api/recipe/RecipeCategory.java index 9f8674e939..a597400f17 100644 --- a/src/main/java/gregtech/api/recipe/RecipeCategory.java +++ b/src/main/java/gregtech/api/recipe/RecipeCategory.java @@ -2,6 +2,7 @@ package gregtech.api.recipe; import java.util.HashMap; import java.util.Map; +import java.util.function.Supplier; import java.util.function.UnaryOperator; import javax.annotation.Nullable; @@ -18,7 +19,8 @@ import gregtech.api.util.MethodsReturnNonnullByDefault; /** * Allows certain recipes to be displayed on different tabs on NEI. *

- * Also apply {@link RecipeCategoryHolder} annotation to each instance to be picked up by GT config. + * Each entry must be declared under {@link gregtech.api.recipe.RecipeCategories}, and config entry must be added to + * {@link gregtech.common.config.Client.NEI.RecipeCategories}. */ @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault @@ -30,20 +32,24 @@ public final class RecipeCategory { public final String unlocalizedName; public final RecipeMap recipeMap; public final ModContainer ownerMod; + public final Supplier settingSupplier; @Nullable public final UnaryOperator handlerInfoCreator; /** * @param unlocalizedName Unlocalized name of this category. Must be unique. * @param recipeMap RecipeMap this category belongs to. + * @param settingSupplier Supplier for the setting whether to enable this category. * @param handlerInfoCreator Supplier of handler info for the NEI handler this category belongs to. */ public RecipeCategory(String unlocalizedName, RecipeMap recipeMap, + Supplier settingSupplier, @Nullable UnaryOperator handlerInfoCreator) { this.unlocalizedName = unlocalizedName; this.recipeMap = recipeMap; this.ownerMod = Loader.instance() .activeModContainer(); + this.settingSupplier = settingSupplier; this.handlerInfoCreator = handlerInfoCreator; if (ALL_RECIPE_CATEGORIES.containsKey(unlocalizedName)) { throw new IllegalArgumentException( @@ -53,7 +59,11 @@ public final class RecipeCategory { } RecipeCategory(RecipeMap recipeMap) { - this(recipeMap.unlocalizedName, recipeMap, recipeMap.getFrontend().neiProperties.handlerInfoCreator); + this( + recipeMap.unlocalizedName, + recipeMap, + RecipeCategorySetting::getDefault, + recipeMap.getFrontend().neiProperties.handlerInfoCreator); } @Override diff --git a/src/main/java/gregtech/api/recipe/RecipeCategoryHolder.java b/src/main/java/gregtech/api/recipe/RecipeCategoryHolder.java deleted file mode 100644 index 0ad87e3f6f..0000000000 --- a/src/main/java/gregtech/api/recipe/RecipeCategoryHolder.java +++ /dev/null @@ -1,13 +0,0 @@ -package gregtech.api.recipe; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Apply this annotation to each recipe category so that GT config will pick it up. - */ -@Target(ElementType.FIELD) -@Retention(RetentionPolicy.RUNTIME) -public @interface RecipeCategoryHolder {} diff --git a/src/main/java/gregtech/api/recipe/RecipeCategorySetting.java b/src/main/java/gregtech/api/recipe/RecipeCategorySetting.java index 4920d64212..0f1c5b3814 100644 --- a/src/main/java/gregtech/api/recipe/RecipeCategorySetting.java +++ b/src/main/java/gregtech/api/recipe/RecipeCategorySetting.java @@ -1,8 +1,5 @@ package gregtech.api.recipe; -import java.util.Locale; -import java.util.stream.Stream; - import javax.annotation.ParametersAreNonnullByDefault; import gregtech.api.util.MethodsReturnNonnullByDefault; @@ -28,25 +25,8 @@ public enum RecipeCategorySetting { HIDE; public static final RecipeCategorySetting[] VALUES = values(); - public static final String[] NAMES = Stream.of(VALUES) - .map(RecipeCategorySetting::toName) - .toArray(String[]::new); public static RecipeCategorySetting getDefault() { return ENABLE; } - - public String toName() { - return toString().toLowerCase(Locale.ENGLISH); - } - - public static RecipeCategorySetting find(String name) { - for (RecipeCategorySetting setting : VALUES) { - if (setting.toName() - .equals(name)) { - return setting; - } - } - return getDefault(); - } } diff --git a/src/main/java/gregtech/api/util/GTClientPreference.java b/src/main/java/gregtech/api/util/GTClientPreference.java index f265094ca3..64bca8d47d 100644 --- a/src/main/java/gregtech/api/util/GTClientPreference.java +++ b/src/main/java/gregtech/api/util/GTClientPreference.java @@ -1,7 +1,6 @@ package gregtech.api.util; -import gregtech.common.config.client.ConfigPreference; -import gregtech.common.config.client.ConfigWaila; +import gregtech.common.config.Client; public class GTClientPreference { @@ -19,10 +18,10 @@ public class GTClientPreference { } public GTClientPreference() { - this.mSingleBlockInitialFilter = ConfigPreference.singleBlockInitialFilter; - this.mSingleBlockInitialMultiStack = ConfigPreference.singleBlockInitialAllowMultiStack; - this.mInputBusInitialFilter = ConfigPreference.inputBusInitialFilter; - this.wailaAverageNS = ConfigWaila.wailaAverageNS; + this.mSingleBlockInitialFilter = Client.preference.singleBlockInitialFilter; + this.mSingleBlockInitialMultiStack = Client.preference.singleBlockInitialAllowMultiStack; + this.mInputBusInitialFilter = Client.preference.inputBusInitialFilter; + this.wailaAverageNS = Client.waila.wailaAverageNS; } public boolean isSingleBlockInitialFilterEnabled() { diff --git a/src/main/java/gregtech/client/GTGUIClientConfig.java b/src/main/java/gregtech/client/GTGUIClientConfig.java index e210f6f25f..cf063acf55 100644 --- a/src/main/java/gregtech/client/GTGUIClientConfig.java +++ b/src/main/java/gregtech/client/GTGUIClientConfig.java @@ -7,11 +7,10 @@ import net.minecraft.client.gui.GuiScreen; import com.gtnewhorizon.gtnhlib.config.ConfigException; import com.gtnewhorizon.gtnhlib.config.SimpleGuiConfig; -import gregtech.common.config.client.ConfigColorModulation; -import gregtech.common.config.client.ConfigInterface; -import gregtech.common.config.client.ConfigPreference; -import gregtech.common.config.client.ConfigRender; -import gregtech.common.config.client.ConfigWaila; +import gregtech.common.config.Client; +import gregtech.common.config.Gregtech; +import gregtech.common.config.MachineStats; +import gregtech.common.config.Worldgen; public class GTGUIClientConfig extends SimpleGuiConfig { @@ -20,10 +19,10 @@ public class GTGUIClientConfig extends SimpleGuiConfig { parentScreen, GregTech.ID, "GregTech", - ConfigColorModulation.class, - ConfigInterface.class, - ConfigPreference.class, - ConfigRender.class, - ConfigWaila.class); + true, + Client.class, + Gregtech.class, + MachineStats.class, + Worldgen.class); } } diff --git a/src/main/java/gregtech/common/GTClient.java b/src/main/java/gregtech/common/GTClient.java index e117a58d71..07d11fe214 100644 --- a/src/main/java/gregtech/common/GTClient.java +++ b/src/main/java/gregtech/common/GTClient.java @@ -779,7 +779,7 @@ public class GTClient extends GTProxy implements Runnable { @SubscribeEvent public void onConfigChange(ConfigChangedEvent.OnConfigChangedEvent e) { - if (GregTech.ID.equals(e.modID) && "client".equals(e.configID)) { + if (GregTech.ID.equals(e.modID)) { // refresh client preference and send to server, since it's the only config we allow changing at runtime. mPreference = new GTClientPreference(); GTPreLoad.loadClientConfig(); diff --git a/src/main/java/gregtech/common/GTProxy.java b/src/main/java/gregtech/common/GTProxy.java index c678914283..ef7070cb59 100644 --- a/src/main/java/gregtech/common/GTProxy.java +++ b/src/main/java/gregtech/common/GTProxy.java @@ -145,8 +145,6 @@ import gregtech.api.objects.GTChunkManager; import gregtech.api.objects.GTItemStack; import gregtech.api.objects.GTUODimensionList; import gregtech.api.objects.ItemData; -import gregtech.api.recipe.RecipeCategory; -import gregtech.api.recipe.RecipeCategorySetting; import gregtech.api.recipe.RecipeMaps; import gregtech.api.util.GTBlockMap; import gregtech.api.util.GTCLSCompat; @@ -163,7 +161,7 @@ import gregtech.api.util.GTShapedRecipe; import gregtech.api.util.GTShapelessRecipe; import gregtech.api.util.GTUtility; import gregtech.api.util.WorldSpawnedEventBuilder; -import gregtech.common.config.opstuff.ConfigGeneral; +import gregtech.common.config.OPStuff; import gregtech.common.items.IDMetaTool01; import gregtech.common.items.MetaGeneratedItem98; import gregtech.common.items.MetaGeneratedTool01; @@ -719,8 +717,6 @@ public abstract class GTProxy implements IGTMod, IFuelHandler { */ public boolean mRenderItemChargeBar = true; - public final Map recipeCategorySettings = new HashMap<>(); - /** * This enables showing voltage tier of transformer for Waila, instead of raw voltage number */ @@ -824,8 +820,8 @@ public abstract class GTProxy implements IGTMod, IFuelHandler { GTLog.ore.println("GTMod: Preload-Phase started!"); GregTechAPI.sPreloadStarted = true; - this.mIgnoreTcon = ConfigGeneral.ignoreTinkerConstruct; - this.replicatorExponent = ConfigGeneral.replicatorExponent; + this.mIgnoreTcon = OPStuff.ignoreTinkerConstruct; + this.replicatorExponent = OPStuff.replicatorExponent; for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry .getRegisteredFluidContainerData()) { if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) { diff --git a/src/main/java/gregtech/common/GTWorldgenerator.java b/src/main/java/gregtech/common/GTWorldgenerator.java index a853472089..14073d3325 100644 --- a/src/main/java/gregtech/common/GTWorldgenerator.java +++ b/src/main/java/gregtech/common/GTWorldgenerator.java @@ -34,7 +34,7 @@ import gregtech.api.objects.XSTR; import gregtech.api.util.GTLog; import gregtech.api.world.GTWorldgen; import gregtech.common.blocks.TileEntityOres; -import gregtech.common.config.worldgen.ConfigEndAsteroids; +import gregtech.common.config.Worldgen; public class GTWorldgenerator implements IWorldGenerator { @@ -65,10 +65,10 @@ public class GTWorldgenerator implements IWorldGenerator { public static OregenPattern oregenPattern = OregenPattern.AXISSYMMETRICAL; public GTWorldgenerator() { - endAsteroids = ConfigEndAsteroids.generateEndAsteroids; - endMinSize = ConfigEndAsteroids.EndAsteroidMinSize; - endMaxSize = ConfigEndAsteroids.EndAsteroidMaxSize; - mEndAsteroidProbability = ConfigEndAsteroids.EndAsteroidProbability; + endAsteroids = Worldgen.endAsteroids.generateEndAsteroids; + endMinSize = Worldgen.endAsteroids.EndAsteroidMinSize; + endMaxSize = Worldgen.endAsteroids.EndAsteroidMaxSize; + mEndAsteroidProbability = Worldgen.endAsteroids.EndAsteroidProbability; GameRegistry.registerWorldGenerator(this, 1073741823); if (debugWorldGen) { GTLog.out.println("GTWorldgenerator created"); diff --git a/src/main/java/gregtech/common/config/Client.java b/src/main/java/gregtech/common/config/Client.java new file mode 100644 index 0000000000..f871b846a4 --- /dev/null +++ b/src/main/java/gregtech/common/config/Client.java @@ -0,0 +1,245 @@ +package gregtech.common.config; + +import static gregtech.api.recipe.RecipeCategorySetting.ENABLE; + +import com.gtnewhorizon.gtnhlib.config.Config; + +import gregtech.api.enums.Mods; +import gregtech.api.recipe.RecipeCategorySetting; + +@Config(modid = Mods.Names.GREG_TECH, category = "client", configSubDirectory = "GregTech", filename = "Client") +@Config.LangKey("GT5U.gui.config.client") +public class Client { + + @Config.Comment("Color Modulation section") + public static final ColorModulation colorModulation = new ColorModulation(); + + @Config.Comment("Interface section") + public static final Interface iface = new Interface(); + + @Config.Comment("Preference section") + public static final Preference preference = new Preference(); + + @Config.Comment("Render section") + public static final Render render = new Render(); + + @Config.Comment("Waila section") + public static final Waila waila = new Waila(); + + @Config.Comment("NEI section") + public static final NEI nei = new NEI(); + + @Config.LangKey("GT5U.gui.config.client.color_modulation") + public static class ColorModulation { + + @Config.Comment("RGB values for the cable insulation color modulation.") + public CableInsulation cableInsulation = new CableInsulation(); + + @Config.Comment("RGB values for the construction foam color modulation.") + public ConstructionFoam constructionFoam = new ConstructionFoam(); + + @Config.Comment("RGB values for the machine metal color modulation (default GUI color).") + public MachineMetal machineMetal = new MachineMetal(); + + @Config.LangKey("GT5U.gui.config.client.color_modulation.cable_insulation") + public static class CableInsulation { + + @Config.DefaultInt(64) + public int red; + + @Config.DefaultInt(64) + public int green; + + @Config.DefaultInt(64) + public int blue; + } + + @Config.LangKey("GT5U.gui.config.client.color_modulation.construction_foam") + public static class ConstructionFoam { + + @Config.DefaultInt(64) + public int red; + + @Config.DefaultInt(64) + public int green; + + @Config.DefaultInt(64) + public int blue; + } + + @Config.LangKey("GT5U.gui.config.client.color_modulation.machine_metal") + public static class MachineMetal { + + @Config.DefaultInt(210) + public int red; + + @Config.DefaultInt(220) + public int green; + + @Config.DefaultInt(255) + public int blue; + } + } + + @Config.LangKey("GT5U.gui.config.client.interface") + public static class Interface { + + @Config.Comment("if true, makes cover tabs visible on GregTech machines.") + @Config.DefaultBoolean(true) + public boolean coverTabsVisible; + + @Config.Comment("if true, puts the cover tabs display on the right of the UI instead of the left.") + @Config.DefaultBoolean(false) + public boolean coverTabsFlipped; + + @Config.Comment("How verbose should tooltips be? 0: disabled, 1: one-line, 2: normal, 3+: extended.") + @Config.DefaultInt(2) + public int tooltipVerbosity; + + @Config.Comment("How verbose should tooltips be when LSHIFT is held? 0: disabled, 1: one-line, 2: normal, 3+: extended.") + @Config.DefaultInt(3) + public int tooltipShiftVerbosity; + + @Config.Comment("Which style to use for title tab on machine GUI? 0: text tab split-dark, 1: text tab unified, 2: item icon tab.") + @Config.DefaultInt(0) + public int titleTabStyle; + } + + @Config.LangKey("GT5U.gui.config.client.preference") + public static class Preference { + + @Config.Comment("if true, input filter will initially be on when input buses are placed in the world.") + @Config.DefaultBoolean(false) + public boolean inputBusInitialFilter; + + @Config.Comment("if true, allow multistacks on single blocks by default when they are first placed in the world.") + @Config.DefaultBoolean(false) + public boolean singleBlockInitialAllowMultiStack; + + @Config.Comment("if true, input filter will initially be on when machines are placed in the world.") + @Config.DefaultBoolean(false) + public boolean singleBlockInitialFilter; + } + + @Config.LangKey("GT5U.gui.config.client.render") + public static class Render { + + @Config.Comment("if true, enables ambient-occlusion smooth lighting on tiles.") + @Config.DefaultBoolean(true) + public boolean renderTileAmbientOcclusion; + + @Config.Comment("if true, enables glowing of the machine controllers.") + @Config.DefaultBoolean(true) + public boolean renderGlowTextures; + + @Config.Comment("if true, render flipped machine with flipped textures.") + @Config.DefaultBoolean(true) + public boolean renderFlippedMachinesFlipped; + + @Config.Comment("if true, render indicators on hatches.") + @Config.DefaultBoolean(true) + public boolean renderIndicatorsOnHatch; + + @Config.Comment("if true, enables dirt particles when pollution reaches the threshold.") + @Config.DefaultBoolean(true) + public boolean renderDirtParticles; + + @Config.Comment("if true, enables pollution fog when pollution reaches the threshold.") + @Config.DefaultBoolean(true) + public boolean renderPollutionFog; + + @Config.Comment("if true, enables the green -> red durability for an item's damage value.") + @Config.DefaultBoolean(true) + public boolean renderItemDurabilityBar; + + @Config.Comment("if true, enables the blue charge bar for an electric item's charge.") + @Config.DefaultBoolean(true) + public boolean renderItemChargeBar; + + @Config.Comment("enables BaseMetaTileEntity block updates handled by BlockUpdateHandler.") + @Config.DefaultBoolean(false) + public boolean useBlockUpdateHandler; + } + + @Config.LangKey("GT5U.gui.config.client.waila") + public static class Waila { + + /** + * This enables showing voltage tier of transformer for Waila, instead of raw voltage number + */ + @Config.Comment("if true, enables showing voltage tier of transformer for Waila, instead of raw voltage number.") + @Config.DefaultBoolean(true) + public boolean wailaTransformerVoltageTier; + + @Config.Comment("if true, enables showing voltage tier of transformer for Waila, instead of raw voltage number.") + @Config.DefaultBoolean(false) + public boolean wailaAverageNS; + } + + @Config.LangKey("GT5U.gui.config.client.nei") + public static class NEI { + + @Config.Comment("Recipe category section") + public final RecipeCategories recipeCategories = new RecipeCategories(); + + @Config.Comment("if true, shows the recipes using seconds (as opposed to ticks).") + @Config.DefaultBoolean(true) + public boolean NEIRecipeSecondMode; + + @Config.Comment("if true, shows the mod which added the recipe.") + @Config.DefaultBoolean(false) + public boolean NEIRecipeOwner; + + @Config.Comment("if true, show the stacktrace related to the recipe addition.") + @Config.DefaultBoolean(false) + public boolean NEIRecipeOwnerStackTrace; + + @Config.Comment("if true, show original voltage when overclocked.") + @Config.DefaultBoolean(false) + public boolean NEIOriginalVoltage; + + @Config.LangKey("GT5U.gui.config.client.nei.recipe_categories") + public static class RecipeCategories { + + @Config.LangKey("gt.recipe.category.arc_furnace_recycling") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting arcFurnaceRecycling = ENABLE; + + @Config.LangKey("gt.recipe.category.plasma_arc_furnace_recycling") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting plasmaArcFurnaceRecycling = ENABLE; + + @Config.LangKey("gt.recipe.category.macerator_recycling") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting maceratorRecycling = ENABLE; + + @Config.LangKey("gt.recipe.category.fluid_extractor_recycling") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting fluidExtractorRecycling = ENABLE; + + @Config.LangKey("gt.recipe.category.alloy_smelter_recycling") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting alloySmelterRecycling = ENABLE; + + @Config.LangKey("gt.recipe.category.alloy_smelter_molding") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting alloySmelterMolding = ENABLE; + + @Config.LangKey("gt.recipe.category.forge_hammer_recycling") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting forgeHammerRecycling = ENABLE; + + @Config.LangKey("gt.recipe.category.tic_part_extruding") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting ticPartExtruding = ENABLE; + + @Config.LangKey("gt.recipe.category.tic_bolt_molding") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting ticBoltMolding = ENABLE; + + @Config.LangKey("gtpp.recipe.category.abs_non_alloy_recipes") + @Config.DefaultEnum("ENABLE") + public RecipeCategorySetting absNonAlloyRecipes = ENABLE; + } + } +} diff --git a/src/main/java/gregtech/common/config/Gregtech.java b/src/main/java/gregtech/common/config/Gregtech.java new file mode 100644 index 0000000000..a293b6cba7 --- /dev/null +++ b/src/main/java/gregtech/common/config/Gregtech.java @@ -0,0 +1,685 @@ +package gregtech.common.config; + +import com.gtnewhorizon.gtnhlib.config.Config; + +import gregtech.api.enums.Mods; +import gregtech.common.GTProxy; + +@Config(modid = Mods.Names.GREG_TECH, category = "gregtech", configSubDirectory = "GregTech", filename = "GregTech") +@Config.LangKey("GT5U.gui.config.gregtech") +public class Gregtech { + + @Config.Comment("Debug section") + public static final Debug debug = new Debug(); + + @Config.Comment("Features section") + public static final Features features = new Features(); + + @Config.Comment("General section") + public static final General general = new General(); + + @Config.Comment("Harvest level section") + public static final HarvestLevel harvestLevel = new HarvestLevel(); + + @Config.Comment("Machines section") + public static final Machines machines = new Machines(); + + @Config.Comment("Ore drop behavior section") + public static final OreDropBehavior oreDropBehavior = new OreDropBehavior(); + + @Config.Comment("Pollution section") + public static final Pollution pollution = new Pollution(); + + @Config.LangKey("GT5U.gui.config.gregtech.debug") + public static class Debug { + + @Config.Comment("enable D1 flag (a set of debug logs)") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean D1; + + @Config.Comment("enable D2 flag (another set of debug logs)") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean D2; + + @Config.Comment("This will prevent NEI from crashing but spams the Log.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean allowBrokenRecipeMap; + + @Config.Comment("Debug parameters for cleanroom testing.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugCleanroom; + + @Config.Comment("Debug parameter for driller testing.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugDriller; + + @Config.Comment("Debug parameter for world generation. Tracks chunks added/removed from run queue.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugWorldgen; + + @Config.Comment("Debug parameter for orevein generation.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugOrevein; + + @Config.Comment("Debug parameter for small ore generation.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugSmallOres; + + @Config.Comment("Debug parameter for stones generation.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugStones; + + @Config.Comment("Debug parameter for single block miner.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugBlockMiner; + + @Config.Comment("Debug parameter for single block pump.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugBlockPump; + + @Config.Comment("Debug parameter for entity cramming reduction.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugEntityCramming; + + @Config.Comment("Debug parameter for gregtech.api.util.GT_ChunkAssociatedData") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugWorldData; + + @Config.Comment("Debug parameter for chunk loaders.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean debugChunkloaders; + } + + @Config.LangKey("GT5U.gui.config.gregtech.features") + public static class Features { + + @Config.Comment("Controls the stacksize of tree related blocks.") + @Config.DefaultInt(64) + @Config.RequiresMcRestart + public int maxLogStackSize; + + @Config.Comment("Controls the stacksize of every oredicted prefix based items used for blocks (if that even makes sense)") + @Config.DefaultInt(64) + @Config.RequiresMcRestart + public int maxOtherBlocksStackSize; + + @Config.Comment("Controls the stacksize of oredicted planks.") + @Config.DefaultInt(64) + @Config.RequiresMcRestart + public int maxPlankStackSize; + + @Config.Comment("Controls the stacksize of oredicted items used in ore treatment.") + @Config.DefaultInt(64) + @Config.RequiresMcRestart + public int maxOreStackSize; + + @Config.Comment("Controls the stacksize of IC2 overclocker upgrades.") + @Config.DefaultInt(4) + @Config.RequiresMcRestart + public int upgradeStackSize; + } + + @Config.LangKey("GT5U.gui.config.gregtech.general") + public static class General { + + @Config.Comment("Control percentage of filled 3x3 chunks. Lower number means less oreveins spawn.") + @Config.DefaultInt(100) + @Config.RequiresMcRestart + public int oreveinPercentage; + + @Config.Comment("Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is cheap") + @Config.DefaultInt(64) + @Config.RequiresMcRestart + public int oreveinAttempts; + + @Config.Comment("Control number of attempts to place a valid ore vein. If a vein wasn't placed due to height restrictions, completely in the water, etc, another attempt is tried.") + @Config.DefaultInt(8) + @Config.RequiresMcRestart + public int oreveinMaxPlacementAttempts; + + @Config.Comment("Whether to place small ores as placer ores for an orevein.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean oreveinPlacerOres; + + @Config.Comment("Multiplier to control how many placer ores get generated.") + @Config.DefaultInt(2) + @Config.RequiresMcRestart + public int oreveinPlacerOresMultiplier; + + @Config.Comment("If true, enables the timber axe (cuts down whole tree in a single hit).") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean timber; + + @Config.Comment("If true, all the GT5U potions are always drinkable.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean drinksAlwaysDrinkable; + + @Config.Comment("if true, shows all the metaitems in creative and in NEI.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean doShowAllItemsInCreative; + + @Config.Comment("if true, makes the GT5U sounds multi-threaded.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean multiThreadedSounds; + + @Config.Comment("Max entity amount in the same block for entity craming.") + @Config.DefaultInt(6) + @Config.RequiresMcRestart + public int maxEqualEntitiesAtOneSpot; + + @Config.Comment("The chance of success to start a fire from the flint and steel.") + @Config.DefaultInt(30) + @Config.RequiresMcRestart + public int flintChance; + + @Config.Comment("Entity despawn time.") + @Config.DefaultInt(6000) + @Config.RequiresMcRestart + public int itemDespawnTime; + + @Config.Comment("If true, allows small boiler automation.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean allowSmallBoilerAutomation; + + @Config.Comment("If true, increases dungeon loots in vanilla structures.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean increaseDungeonLoot; + + @Config.Comment("If true, spawns an axe at the start in adventure mode. Does nothing if the advanture mode isn't forced.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean axeWhenAdventure; + + @Config.Comment("If true, forces the survival map into adventure mode.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean survivalIntoAdventure; + + @Config.Comment("If true, hungers the players based on his amount of stuff in the inventory every 6s, regardless of player movement.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean hungerEffect; + + @Config.Comment("If true, enables the item oredification of the items in the inventory.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean inventoryUnification; + + @Config.Comment("if true, enables GT5U and GT++ bees.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean GTBees; + + @Config.Comment("if true, enables crafting unification.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean craftingUnification; + + @Config.Comment("If true, nerfs planks recipes.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean nerfedWoodPlank; + + @Config.Comment("if true, reduces the durability of the vanilla tools.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean nerfedVanillaTools; + + @Config.Comment("if true, enables GT5U achievements.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean achievements; + + @Config.Comment("if true, hides unused ores.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean hideUnusedOres; + + @Config.Comment("if true, enables all the materials in GT5U.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean enableAllMaterials; + + @Config.Comment("Controls the amount of tick over the lag averaging is done with the scanner.") + @Config.DefaultInt(25) + @Config.RequiresMcRestart + public int ticksForLagAveraging; + + @Config.Comment("Controls the threshold (in ms) above which a lag warning is issued in log for a specific tile entity.") + @Config.DefaultInt(100) + @Config.RequiresMcRestart + public int millisecondThesholdUntilLagWarning; + + @Config.Comment("if true, drops the content of the machine inventory before exploding.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean explosionItemDrop; + + @Config.Comment("if true, enables the cleanroom multi.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean enableCleanroom; + + @Config.Comment("if true, enables low gravity requirement in some crafts. Is forced to false if GalactiCraft is not present.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean lowGravProcessing; + + @Config.Comment("if true, crops need a block below to fully grow.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean cropNeedBlock; + + @Config.Comment("if yes, allows the automatic interactions with the maintenance hatches.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean autoMaintenaceHatchesInteraction; + + @Config.Comment("if true, mixed ores only yields the equivalent of 2/3 of the pure ores.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean mixedOreOnlyYieldsTwoThirdsOfPureOre; + + @Config.Comment("if true, rich ores yield twice as much as normal ores.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean richOreYieldMultiplier; + + @Config.Comment("if true, nether ores yield twice as much as normal ores.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean netherOreYieldMultiplier; + + @Config.Comment("if true, end ores yield twice as much as normal ores.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean endOreYieldMultiplier; + + @Config.Comment("if true, enables GT6 styled pipe connections.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean gt6Pipe; + + @Config.Comment("if true, enables GT6 styled wire connections.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean gt6Cable; + + @Config.Comment("if true, allows GT5U cables to be IC2 power sources.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean ic2EnergySourceCompat; + + @Config.Comment("if true, wires will require soldering material to be connected.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean costlyCableConnection; + + @Config.Comment("if true, crashes on null recipe input.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean crashOnNullRecipeInput; + + @Config.Comment("if true, enable placeholder for material names in lang file.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean i18nPlaceholder; + + @Config.Comment("if true, sets the hardness of the mobspawers to 500 and their blast resistance to 6 000 000.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean harderMobSpawner; + + @Config.Comment("Controls the minimum distance allowed for the long distance pipelines to form.") + @Config.DefaultInt(64) + @Config.RequiresMcRestart + public int minimalDistancePoints; + + @Config.Comment("This will set the blacklist of blocks for CTM blocks.") + @Config.DefaultStringList({ "team.chisel.block.BlockRoadLine" }) + @Config.RequiresMcRestart + public String[] CTMBlacklist; + + @Config.Comment("This will set the whitelist of blocks for CTM blocks.") + @Config.DefaultStringList({ "team.chisel.block.BlockCarvable", "team.chisel.block.BlockCarvableGlass" }) + @Config.RequiresMcRestart + public String[] CTMWhitelist; + + @Config.Comment("if true, logs all the oredict in logs/OreDict.log.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean loggingOreDict; + + @Config.Comment("if true, logs all the oredict in logs/Explosion.log.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean loggingExplosions; + + @Config.Comment("if true, log all the oredict in logs/PlayerActivity.log.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean loggingPlayerActicity; + } + + @Config.LangKey("GT5U.gui.config.gregtech.harvest_level") + public static class HarvestLevel { + + @Config.Comment("Activate Harvest Level Change") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean activateHarvestLevelChange; + + @Config.Comment("Maximum harvest level") + @Config.DefaultInt(7) + @Config.RequiresMcRestart + public int maxHarvestLevel; + + @Config.Comment("GraniteHarvestLevel harvest level") + @Config.DefaultInt(3) + @Config.RequiresMcRestart + public int graniteHarvestLevel; + } + + @Config.LangKey("GT5U.gui.config.gregtech.machines") + public static class Machines { + + @Config.Comment("Number of ticks between sending sound packets to clients for electric machines. Default is 1.5 seconds. Trying to mitigate lag and FPS drops.") + @Config.DefaultInt(30) + @Config.RequiresMcRestart + public int ticksBetweenSounds; + + @Config.Comment("This will set the blacklist for the world accelerator in TE mode.") + @Config.DefaultStringList({ "com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry", + "advsolar.common.tiles.TileEntityUltimateSolarPanel", "advsolar.common.tiles.TileEntitySolarPanel", + "advsolar.common.tiles.TileEntityQuantumSolarPanel", "advsolar.common.tiles.TileEntityHybridSolarPanel", + "advsolar.common.tiles.TileEntityAdvancedSolarPanel", "com.supsolpans.tiles.TileAdminSolarPanel", + "com.supsolpans.tiles.TilePhotonicSolarPanel", "com.supsolpans.tiles.TileSingularSolarPanel", + "com.supsolpans.tiles.TileSpectralSolarPanel", "emt.tile.solar.air.TileEntityAirSolar", + "emt.tile.solar.air.TileEntityDoubleAirSolar", "emt.tile.solar.air.TileEntityTripleAirSolar", + "emt.tile.solar.air.TileEntityQuadrupleAirSolar", "emt.tile.solar.air.TileEntityQuintupleAirSolar", + "emt.tile.solar.air.TileEntitySextupleAirSolar", "emt.tile.solar.air.TileEntitySeptupleAirSolar", + "emt.tile.solar.air.TileEntityOctupleAirSolar", "emt.tile.solar.compressed.TileEntityCompressedSolar", + "emt.tile.solar.compressed.TileEntityDoubleCompressedSolar", + "emt.tile.solar.compressed.TileEntityTripleCompressedSolar", + "emt.tile.solar.compressed.TileEntityQuadrupleAirSolar", + "emt.tile.solar.compressed.TileEntityQuintupleAirSolar", + "emt.tile.solar.compressed.TileEntitySextupleAirSolar", + "emt.tile.solar.compressed.TileEntitySeptupleAirSolar", + "emt.tile.solar.compressed.TileEntityOctupleAirSolar", "emt.tile.solar.dark.TileEntityDarkSolar", + "emt.tile.solar.dark.TileEntityDoubleDarkSolar", "emt.tile.solar.dark.TileEntityTripleDarkSolar", + "emt.tile.solar.dark.TileEntityQuadrupleAirSolar", "emt.tile.solar.dark.TileEntityQuintupleAirSolar", + "emt.tile.solar.dark.TileEntitySextupleAirSolar", "emt.tile.solar.dark.TileEntitySeptupleAirSolar", + "emt.tile.solar.dark.TileEntityOctupleAirSolar", "emt.tile.solar.earth.TileEntityDoubleEarthSolar", + "emt.tile.solar.earth.TileEntityEarthSolar", "emt.tile.solar.earth.TileEntityTripleEarthSolar", + "emt.tile.solar.earth.TileEntityQuadrupleAirSolar", "emt.tile.solar.earth.TileEntityQuintupleAirSolar", + "emt.tile.solar.earth.TileEntitySextupleAirSolar", "emt.tile.solar.earth.TileEntitySeptupleAirSolar", + "emt.tile.solar.earth.TileEntityOctupleAirSolar", "emt.tile.solar.fire.TileEntityDoubleFireSolar", + "emt.tile.solar.fire.TileEntityFireSolar", "emt.tile.solar.fire.TileEntityTripleFireSolar", + "emt.tile.solar.fire.TileEntityQuadrupleAirSolar", "emt.tile.solar.fire.TileEntityQuintupleAirSolar", + "emt.tile.solar.fire.TileEntitySextupleAirSolar", "emt.tile.solar.fire.TileEntitySeptupleAirSolar", + "emt.tile.solar.fire.TileEntityOctupleAirSolar", "emt.tile.solar.order.TileEntityDoubleOrderSolar", + "emt.tile.solar.order.TileEntityOrderSolar", "emt.tile.solar.order.TileEntityTripleOrderSolar", + "emt.tile.solar.order.TileEntityQuadrupleAirSolar", "emt.tile.solar.order.TileEntityQuintupleAirSolar", + "emt.tile.solar.order.TileEntitySextupleAirSolar", "emt.tile.solar.order.TileEntitySeptupleAirSolar", + "emt.tile.solar.order.TileEntityOctupleAirSolar", "emt.tile.solar.water.TileEntityDoubleWaterSolar", + "emt.tile.solar.water.TileEntityTripleWaterSolar", "emt.tile.solar.water.TileEntityWaterSolar", + "emt.tile.solar.water.TileEntityQuadrupleAirSolar", "emt.tile.solar.water.TileEntityQuintupleAirSolar", + "emt.tile.solar.water.TileEntitySextupleAirSolar", "emt.tile.solar.water.TileEntitySeptupleAirSolar", + "emt.tile.solar.water.TileEntityOctupleAirSolar", "com.lulan.compactkineticgenerators.tileentity.TileCkgE", + "com.lulan.compactkineticgenerators.tileentity.TileCkgH", + "com.lulan.compactkineticgenerators.tileentity.TileCkgL", + "com.lulan.compactkineticgenerators.tileentity.TileCkgM", + "com.lulan.compactkineticgenerators.tileentity.TileCkwaE", + "com.lulan.compactkineticgenerators.tileentity.TileCkwaH", + "com.lulan.compactkineticgenerators.tileentity.TileCkwaL", + "com.lulan.compactkineticgenerators.tileentity.TileCkwaM", + "com.lulan.compactkineticgenerators.tileentity.TileCkwmE", + "com.lulan.compactkineticgenerators.tileentity.TileCkwmH", + "com.lulan.compactkineticgenerators.tileentity.TileCkwmL", + "com.lulan.compactkineticgenerators.tileentity.TileCkwmM", "com.supsolpans.tiles.TileSpectralSolarPanel", + "com.supsolpans.tiles.TileSingularSolarPanel", "com.supsolpans.tiles.TileAdminSolarPanel", + "com.supsolpans.tiles.TilePhotonicSolarPanel", "gtPlusPlus.core.tileentities.general.TileEntityFishTrap", + "gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest", + "net.bdew.gendustry.machines.apiary.TileApiary", "goodgenerator.blocks.tileEnti