diff options
Diffstat (limited to 'src/main/java')
55 files changed, 1490 insertions, 1539 deletions
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. * <p> - * 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<RecipeCategorySetting> settingSupplier; @Nullable public final UnaryOperator<HandlerInfo.Builder> 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<RecipeCategorySetting> settingSupplier, @Nullable UnaryOperator<HandlerInfo.Builder> 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<RecipeCategory, RecipeCategorySetting> 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.tileEntity.EssentiaHatch", + "magicbees.tileentity.TileEntityApimancersDrainerCommon", + "magicbees.tileentity.TileEntityApimancersDrainerGT" }) + @Config.RequiresMcRestart + public String[] blacklistedTileEntiyClassNamesForWA; + + @Config.Comment("This will set the percentage how much ReinforcedGlass is Allowed in Cleanroom Walls.") + @Config.DefaultFloat(5.0f) + @Config.RequiresMcRestart + public float cleanroomGlass; + + @Config.Comment("This will let machines such as drills and pumps chunkload their work area.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean enableChunkloaders; + + @Config.Comment("This will make all chunkloading machines act as World Anchors (true) or Passive Anchors (false).") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean alwaysReloadChunkloaders; + + @Config.Comment("If true, then digital chest with AE2 storage bus will be accessible only through AE2") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean disableDigitalChestsExternalAccess; + + @Config.Comment("If true, machines can explode.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean machineExplosions; + + @Config.Comment("If true, machine can take fire.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean machineFlammable; + + @Config.Comment("If true, explodes if the machine is dismantled without a wrench.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean machineNonWrenchExplosions; + + @Config.Comment("If true, burn the wires on explosion. (by sending IV amps into the cables)") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean machineWireFire; + + @Config.Comment("If true, machine will randomly explode if there is fire on adjacent blocks.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean machineFireExplosions; + + @Config.Comment("If true, will randomly explode if it is raining.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean machineRainExplosions; + + @Config.Comment("If true, will randomly explode during thunderstorm if the machine can be exposed to rain.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean machineThunderExplosions; + + @Config.Comment("If true, enable the guis of the machines to get a tint and it will be of the color of the dye applied to the machine.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean coloredGUI; + + @Config.Comment("If true and if the machine tint is activated, the guis will have a uniform metallic tint no matter what color is applied to the machines.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean machineMetalGUI; + + // Implementation for this is actually handled in NewHorizonsCoreMod in MainRegistry.java! + @Config.Comment("If true, use the definition of the metallic tint in GT5U, otherwise NHCore will set it to white.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean useMachineMetal; + + @Config.Comment("if true, enables MuTEs(multitile entities) to be added to the game. MuTEs are in the start of development and its not recommended to enable them unless you know what you are doing. (always activated in dev env)") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean enableMultiTileEntities; + } + + @Config.LangKey("GT5U.gui.config.gregtech.ore_drop_behavior") + public static class OreDropBehavior { + + @Config.Comment({ "Settings:", + " - 'PerDimBlock': Sets the drop to the block variant of the ore block based on dimension, defaults to stone type", + " - 'UnifiedBlock': Sets the drop to the stone variant of the ore block", + " - 'Block': Sets the drop to the ore mined", + " - 'FortuneItem': Sets the drop to the new ore item and makes it affected by fortune" + + " - 'Item': Sets the drop to the new ore item" }) + + @Config.DefaultEnum("FortuneItem") + @Config.RequiresMcRestart + public GTProxy.OreDropSystem setting = GTProxy.OreDropSystem.FortuneItem; + } + + @Config.LangKey("GT5U.gui.config.gregtech.pollution") + public static class Pollution { + + @Config.Comment("if true, enables pollution in the game.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean pollution; + + @Config.Comment("Controls the threshold starting from which you can see fog.") + @Config.DefaultInt(550_000) + @Config.RequiresMcRestart + public int pollutionSmogLimit; + @Config.Comment("Controls the threshold starting from which players get poison effect.") + @Config.DefaultInt(750_000) + @Config.RequiresMcRestart + public int pollutionPoisonLimit; + @Config.Comment("Controls the threshold starting from which vegetation starts to be killed.") + @Config.DefaultInt(1_000_000) + @Config.RequiresMcRestart + public int pollutionVegetationLimit; + @Config.Comment("Controls the threshold starting from which if it rains, will turn cobblestone into gravel and gravel into sand.") + @Config.DefaultInt(2_000_000) + @Config.RequiresMcRestart + public int pollutionSourRainLimit; + @Config.Comment("Controls the pollution released by an explosion.") + @Config.DefaultInt(100_000) + @Config.RequiresMcRestart + public int pollutionOnExplosion; + @Config.Comment("Controls the pollution released per second by the bricked blast furnace.") + @Config.DefaultInt(200) + @Config.RequiresMcRestart + public int pollutionPrimitveBlastFurnacePerSecond; + @Config.Comment("Controls the pollution released per second by the charcoal pile igniter.") + @Config.DefaultInt(100) + @Config.RequiresMcRestart + public int pollutionCharcoalPitPerSecond; + @Config.Comment("Controls the pollution released per second by the EBF.") + @Config.DefaultInt(400) + @Config.RequiresMcRestart + public int pollutionEBFPerSecond; + @Config.Comment("Controls the pollution released per second by the large combustion engine.") + @Config.DefaultInt(480) + @Config.RequiresMcRestart + public int pollutionLargeCombustionEnginePerSecond; + @Config.Comment("Controls the pollution released per second by the extreme combustion engine.") + @Config.DefaultInt(3_840) + @Config.RequiresMcRestart + public int pollutionExtremeCombustionEnginePerSecond; + @Config.Comment("Controls the pollution released per second by the implosion compressor.") + @Config.DefaultInt(10_000) + @Config.RequiresMcRestart + public int pollutionImplosionCompressorPerSecond; + @Config.Comment("Controls the pollution released per second by the large bronze boiler.") + @Config.DefaultInt(1_000) + @Config.RequiresMcRestart + public int pollutionLargeBronzeBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the large steel boiler.") + @Config.DefaultInt(2_000) + @Config.RequiresMcRestart + public int pollutionLargeSteelBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the large titanium boiler.") + @Config.DefaultInt(3_000) + @Config.RequiresMcRestart + public int pollutionLargeTitaniumBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the large tungstensteel boiler.") + @Config.DefaultInt(4_000) + @Config.RequiresMcRestart + public int pollutionLargeTungstenSteelBoilerPerSecond; + @Config.Comment("Controls the pollution reduction obtained with each increment of the circuit when throttling large boilers.") + @Config.DefaultFloat(1.0f / 24.0f) // divided by 24 because there are 24 circuit configs. + @Config.RequiresMcRestart + public float pollutionReleasedByThrottle; + @Config.Comment("Controls the pollution released per second by the large gas turbine.") + @Config.DefaultInt(300) + @Config.RequiresMcRestart + public int pollutionLargeGasTurbinePerSecond; + @Config.Comment("Controls the pollution released per second by the multi smelter.") + @Config.DefaultInt(400) + @Config.RequiresMcRestart + public int pollutionMultiSmelterPerSecond; + @Config.Comment("Controls the pollution released per second by the pyrolyse oven.") + @Config.DefaultInt(300) + @Config.RequiresMcRestart + public int pollutionPyrolyseOvenPerSecond; + @Config.Comment("Controls the pollution released per second by the small coil boiler.") + @Config.DefaultInt(20) + @Config.RequiresMcRestart + public int pollutionSmallCoalBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the high pressure lava boiler.") + @Config.DefaultInt(20) + @Config.RequiresMcRestart + public int pollutionHighPressureLavaBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the high pressure coil boiler.") + @Config.DefaultInt(30) + @Config.RequiresMcRestart + public int pollutionHighPressureCoalBoilerPerSecond; + + @Config.Comment("Controls the pollution released per second by the base diesel generator.") + @Config.DefaultInt(40) + @Config.RequiresMcRestart + public int pollutionBaseDieselGeneratorPerSecond; + + // reading double as strings, not perfect, but better than nothing + @Config.Comment({ + "Pollution released by tier, with the following formula: PollutionBaseDieselGeneratorPerSecond * PollutionDieselGeneratorReleasedByTier[Tier]", + "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." }) + @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8 }) + @Config.RequiresMcRestart + public double[] pollutionDieselGeneratorReleasedByTier; + + @Config.Comment("Controls the pollution released per second by the base gas turbine.") + @Config.DefaultInt(40) + @Config.RequiresMcRestart + public int pollutionBaseGasTurbinePerSecond; + + // reading double as strings, not perfect, but better than nothing + @Config.Comment({ + "Pollution released by tier, with the following formula: PollutionBaseGasTurbinePerSecond * PollutionGasTurbineReleasedByTier[Tier]", + "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." }) + @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8, 0.7, 0.6 }) + @Config.RequiresMcRestart + public double[] pollutionGasTurbineReleasedByTier; + } +} diff --git a/src/main/java/gregtech/common/config/MachineStats.java b/src/main/java/gregtech/common/config/MachineStats.java new file mode 100644 index 0000000000..2e7dfc7abf --- /dev/null +++ b/src/main/java/gregtech/common/config/MachineStats.java @@ -0,0 +1,169 @@ +package gregtech.common.config; + +import com.gtnewhorizon.gtnhlib.config.Config; + +import gregtech.api.enums.Mods; + +@Config( + modid = Mods.Names.GREG_TECH, + category = "machine_stats", + configSubDirectory = "GregTech", + filename = "MachineStats") +@Config.LangKey("GT5U.gui.config.machine_stats") +public class MachineStats { + + @Config.Comment("Bronze solar boiler section") + public static BronzeSolarBoiler bronzeSolarBoiler = new BronzeSolarBoiler(); + + @Config.Comment("Steel solar boiler section") + public static SteelSolarBoiler steelSolarBoiler = new SteelSolarBoiler(); + + @Config.Comment("Machines section") + public static Machines machines = new Machines(); + + @Config.Comment("Mass fabricator section") + public static MassFabricator massFabricator = new MassFabricator(); + + @Config.Comment("Microwave energy transmitter section") + public static MicrowaveEnergyTransmitter microwaveEnergyTransmitter = new MicrowaveEnergyTransmitter(); + + @Config.Comment("Teleporter section") + public static Teleporter teleporter = new Teleporter(); + + @Config.LangKey("GT5U.gui.config.machine_stats.bronze_solar_boiler") + public static class BronzeSolarBoiler { + + @Config.Comment({ "Number of run-time ticks before boiler starts calcification.", + "100% calcification and minimal output will be reached at 2 times this." }) + @Config.DefaultInt(1_080_000) + @Config.RequiresMcRestart + public int calcificationTicks; + + @Config.Comment("Number of ticks it takes to lose 1°C.") + @Config.DefaultInt(45) + @Config.RequiresMcRestart + public int cooldownTicks; + + @Config.DefaultInt(120) + @Config.RequiresMcRestart + public int maxOutputPerSecond; + + @Config.DefaultInt(40) + @Config.RequiresMcRestart + public int minOutputPerSecond; + } + + @Config.LangKey("GT5U.gui.config.machine_stats.steel_solar_boiler") + public static class SteelSolarBoiler { + + @Config.Comment({ "Number of run-time ticks before boiler starts calcification.", + "100% calcification and minimal output will be reached at 2 times this." }) + @Config.DefaultInt(1_080_000) + @Config.RequiresMcRestart + public int calcificationTicks; + + @Config.Comment("Number of ticks it takes to lose 1°C.") + @Config.DefaultInt(75) + @Config.RequiresMcRestart + public int cooldownTicks; + + @Config.DefaultInt(360) + @Config.RequiresMcRestart + public int maxOutputPerSecond; + + @Config.DefaultInt(120) + @Config.RequiresMcRestart + public int minOutputPerSecond; + } + + @Config.LangKey("GT5U.gui.config.machine_stats.machines") + public static class Machines { + + @Config.Comment("Controls the damageFactorLow variable in the maintenance damage equation.") + @Config.DefaultInt(5) + @Config.RequiresMcRestart + public int damageFactorLow; + + @Config.Comment("Controls the damageFactorHigh variable in the maintenance damage equation.") + @Config.DefaultFloat(0.6f) + @Config.RequiresMcRestart + public float damageFactorHigh; + + @Config.Comment("if true, disable maintenance checks.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean disableMaintenanceChecks; + + @Config.Comment("If true, allows for multiple eggs on the magical energy absorber.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean allowMultipleEggs; + + @Config.Comment("If true, requires at least a free face to open a machine gui.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean forceFreeFace; + } + + @Config.LangKey("GT5U.gui.config.machine_stats.mass_fabricator") + public static class MassFabricator { + + @Config.Comment("if true, requires UUA to run the mass fab.") + @Config.DefaultBoolean(false) + @Config.RequiresMcRestart + public boolean requiresUUA; + + @Config.Comment("Duration multiplier.") + @Config.DefaultInt(3215) + @Config.RequiresMcRestart + public int durationMultiplier; + + @Config.Comment("mb of UUA per UUM.") + @Config.DefaultInt(1) + @Config.RequiresMcRestart + public int UUAPerUUM; + + @Config.Comment("Speed bonus delivered by the UUA.") + @Config.DefaultInt(40) + @Config.RequiresMcRestart + public int UUASpeedBonus; + } + + @Config.LangKey("GT5U.gui.config.machine_stats.microwave_energy_transmitter") + public static class MicrowaveEnergyTransmitter { + + @Config.Comment("if true, it has a passive energy loss.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean passiveEnergyUse; + + @Config.Comment("max loss.") + @Config.DefaultInt(50) + @Config.RequiresMcRestart + public int maxLoss; + + @Config.Comment("max loss distance.") + @Config.DefaultInt(10_000) + @Config.RequiresMcRestart + public int maxLossDistance; + } + + @Config.LangKey("GT5U.gui.config.machine_stats.teleporter") + public static class Teleporter { + + @Config.Comment("if true, allows interdim tp") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean interDimensionalTPAllowed; + + @Config.Comment("passive energy loss.") + @Config.DefaultInt(2048) + @Config.RequiresMcRestart + public int passiveEnergyDrain; + + @Config.Comment("power multiplier.") + @Config.DefaultInt(100) + @Config.RequiresMcRestart + public int powerMultiplier; + } +} diff --git a/src/main/java/gregtech/common/config/opstuff/ConfigGeneral.java b/src/main/java/gregtech/common/config/OPStuff.java index 63cd2bc231..0b9877dc79 100644 --- a/src/main/java/gregtech/common/config/opstuff/ConfigGeneral.java +++ b/src/main/java/gregtech/common/config/OPStuff.java @@ -1,4 +1,4 @@ -package gregtech.common.config.opstuff; +package gregtech.common.config; import com.gtnewhorizon.gtnhlib.config.Config; @@ -6,10 +6,10 @@ import gregtech.api.enums.Mods; @Config( modid = Mods.Names.GREG_TECH, - category = "general", + category = "op_stuff", configSubDirectory = "GregTech", filename = "OverpoweredStuff") -public class ConfigGeneral { +public class OPStuff { @Config.Comment("How much RF you get with 100 EU in input.") @Config.DefaultInt(360) diff --git a/src/main/java/gregtech/common/config/other/ConfigGeneral.java b/src/main/java/gregtech/common/config/Other.java index 495ef190c4..724e3aa24b 100644 --- a/src/main/java/gregtech/common/config/other/ConfigGeneral.java +++ b/src/main/java/gregtech/common/config/Other.java @@ -1,11 +1,11 @@ -package gregtech.common.config.other; +package gregtech.common.config; import com.gtnewhorizon.gtnhlib.config.Config; import gregtech.api.enums.Mods; -@Config(modid = Mods.Names.GREG_TECH, category = "general", configSubDirectory = "GregTech", filename = "Other") -public class ConfigGeneral { +@Config(modid = Mods.Names.GREG_TECH, category = "other", configSubDirectory = "GregTech", filename = "Other") +public class Other { @Config.Comment("How much pipes you can chain wrench to disable their input.") @Config.DefaultInt(64) diff --git a/src/main/java/gregtech/common/config/Worldgen.java b/src/main/java/gregtech/common/config/Worldgen.java new file mode 100644 index 0000000000..274d59a774 --- /dev/null +++ b/src/main/java/gregtech/common/config/Worldgen.java @@ -0,0 +1,80 @@ +package gregtech.common.config; + +import com.gtnewhorizon.gtnhlib.config.Config; + +import gregtech.api.enums.Mods; + +@Config( + modid = Mods.Names.GREG_TECH, + category = "worldgen", + configSubDirectory = "GregTech", + filename = "WorldGeneration") +@Config.LangKey("GT5U.gui.config.worldgen") +public class Worldgen { + + public static General general = new General(); + public static EndAsteroids endAsteroids = new EndAsteroids(); + + @Config.LangKey("GT5U.gui.config.worldgen.end_asteroids") + public static class EndAsteroids { + + @Config.Comment("The maximum size for the end asteroids.") + @Config.DefaultInt(200) + @Config.RequiresMcRestart + public int EndAsteroidMaxSize; + + @Config.Comment("The minimum size for the end asteroids.") + @Config.DefaultInt(200) + @Config.RequiresMcRestart + public int EndAsteroidMinSize; + + @Config.Comment("The probability weight to generate end asteroids.") + @Config.DefaultInt(300) + @Config.RequiresMcRestart + public int EndAsteroidProbability; + + @Config.Comment("if true, enables end asteroids.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean generateEndAsteroids; + } + + @Config.LangKey("GT5U.gui.config.worldgen.general") + public static class General { + + @Config.Comment("if true, enables basalt ore gen.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean generateBasaltOres; + + @Config.Comment("if true, enables black granite ore gen.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean generateBlackGraniteOres; + + @Config.Comment("if true, enables marble ore gen.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean generateMarbleOres; + + @Config.Comment("if true, enables red granite ore gen.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean generateRedGraniteOres; + + @Config.Comment("If true, disables vanilla oregen.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean disableVanillaOres; + + @Config.Comment("if true, enables underground dirt gen. Does nothing if the vanilla oregen is enabled!") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean generateUndergroundDirtGen; + + @Config.Comment("if true, enables underground gravel gen. Does nothing if the vanilla oregen is enabled!") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public boolean generateUndergroundGravelGen; + } +} diff --git a/src/main/java/gregtech/common/config/client/ConfigColorModulation.java b/src/main/java/gregtech/common/config/client/ConfigColorModulation.java deleted file mode 100644 index f5b189136e..0000000000 --- a/src/main/java/gregtech/common/config/client/ConfigColorModulation.java +++ /dev/null @@ -1,25 +0,0 @@ -package gregtech.common.config.client; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "color_modulation", - configSubDirectory = "GregTech", - filename = "Client") -public class ConfigColorModulation { - - @Config.Comment("hex value for the cable insulation color modulation.") - @Config.DefaultString("#404040") - public static String cableInsulation; - - @Config.Comment("hex value for the construction foam color modulation.") - @Config.DefaultString("#404040") - public static String constructionFoam; - - @Config.Comment("hex value for the machine metal color modulation.") - @Config.DefaultString("#D2DCFF") - public static String machineMetal; -} diff --git a/src/main/java/gregtech/common/config/client/ConfigInterface.java b/src/main/java/gregtech/common/config/client/ConfigInterface.java deleted file mode 100644 index 261be6f51c..0000000000 --- a/src/main/java/gregtech/common/config/client/ConfigInterface.java +++ /dev/null @@ -1,29 +0,0 @@ -package gregtech.common.config.client; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "interface", configSubDirectory = "GregTech", filename = "Client") -public class ConfigInterface { - - @Config.Comment("if true, makes cover tabs visible on GregTech machines.") - @Config.DefaultBoolean(true) - public static 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 static boolean coverTabsFlipped; - - @Config.Comment("How verbose should tooltips be? 0: disabled, 1: one-line, 2: normal, 3+: extended.") - @Config.DefaultInt(2) - public static 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 static 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 static int titleTabStyle; -} diff --git a/src/main/java/gregtech/common/config/client/ConfigPreference.java b/src/main/java/gregtech/common/config/client/ConfigPreference.java deleted file mode 100644 index f69ee8b890..0000000000 --- a/src/main/java/gregtech/common/config/client/ConfigPreference.java +++ /dev/null @@ -1,21 +0,0 @@ -package gregtech.common.config.client; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "preference", configSubDirectory = "GregTech", filename = "Client") -public class ConfigPreference { - - @Config.Comment("if true, input filter will initially be on when input buses are placed in the world.") - @Config.DefaultBoolean(false) - public static 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 static boolean singleBlockInitialAllowMultiStack; - - @Config.Comment("if true, input filter will initially be on when machines are placed in the world.") - @Config.DefaultBoolean(false) - public static boolean singleBlockInitialFilter; -} diff --git a/src/main/java/gregtech/common/config/client/ConfigRender.java b/src/main/java/gregtech/common/config/client/ConfigRender.java deleted file mode 100644 index 27860a13cb..0000000000 --- a/src/main/java/gregtech/common/config/client/ConfigRender.java +++ /dev/null @@ -1,46 +0,0 @@ -package gregtech.common.config.client; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "render", configSubDirectory = "GregTech", filename = "Client") -public class ConfigRender { - - @Config.Comment("if true, enables ambient-occlusion smooth lighting on tiles.") - @Config.DefaultBoolean(true) - public static boolean renderTileAmbientOcclusion; - - @Config.Comment("if true, enables glowing of the machine controllers.") - @Config.DefaultBoolean(true) - public static boolean renderGlowTextures; - - @Config.Comment("if true, render flipped machine with flipped textures.") - @Config.DefaultBoolean(true) - public static boolean renderFlippedMachinesFlipped; - - @Config.Comment("if true, render indicators on hatches.") - @Config.DefaultBoolean(true) - public static boolean renderIndicatorsOnHatch; - - @Config.Comment("if true, enables dirt particles when pollution reaches the threshold.") - @Config.DefaultBoolean(true) - public static boolean renderDirtParticles; - - @Config.Comment("if true, enables pollution fog when pollution reaches the threshold.") - @Config.DefaultBoolean(true) - public static boolean renderPollutionFog; - - @Config.Comment("if true, enables the green -> red durability for an item's damage value.") - @Config.DefaultBoolean(true) - public static boolean renderItemDurabilityBar; - - @Config.Comment("if true, enables the blue charge bar for an electric item's charge.") - @Config.DefaultBoolean(true) - public static boolean renderItemChargeBar; - - @Config.Comment("enables BaseMetaTileEntity block updates handled by BlockUpdateHandler.") - @Config.DefaultBoolean(false) - public static boolean useBlockUpdateHandler; - -} diff --git a/src/main/java/gregtech/common/config/client/ConfigWaila.java b/src/main/java/gregtech/common/config/client/ConfigWaila.java deleted file mode 100644 index 9d6f732941..0000000000 --- a/src/main/java/gregtech/common/config/client/ConfigWaila.java +++ /dev/null @@ -1,21 +0,0 @@ -package gregtech.common.config.client; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "waila", configSubDirectory = "GregTech", filename = "Client") - -public class ConfigWaila { - - /** - * 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 static boolean wailaTransformerVoltageTier; - - @Config.Comment("if true, enables showing voltage tier of transformer for Waila, instead of raw voltage number.") - @Config.DefaultBoolean(false) - public static boolean wailaAverageNS; -} diff --git a/src/main/java/gregtech/common/config/gregtech/ConfigDebug.java b/src/main/java/gregtech/common/config/gregtech/ConfigDebug.java deleted file mode 100644 index fe5fc52b13..0000000000 --- a/src/main/java/gregtech/common/config/gregtech/ConfigDebug.java +++ /dev/null @@ -1,79 +0,0 @@ -package gregtech.common.config.gregtech; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "debug", configSubDirectory = "GregTech", filename = "GregTech") -public class ConfigDebug { - - @Config.Comment("enable D1 flag (a set of debug logs)") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean D1; - - @Config.Comment("enable D2 flag (another set of debug logs)") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean D2; - - @Config.Comment("This will prevent NEI from crashing but spams the Log.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean allowBrokenRecipeMap; - - @Config.Comment("Debug parameters for cleanroom testing.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugCleanroom; - - @Config.Comment("Debug parameter for driller testing.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugDriller; - - @Config.Comment("Debug parameter for world generation. Tracks chunks added/removed from run queue.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugWorldgen; - - @Config.Comment("Debug parameter for orevein generation.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugOrevein; - - @Config.Comment("Debug parameter for small ore generation.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugSmallOres; - - @Config.Comment("Debug parameter for stones generation.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugStones; - - @Config.Comment("Debug parameter for single block miner.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugBlockMiner; - - @Config.Comment("Debug parameter for single block pump.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugBlockPump; - - @Config.Comment("Debug parameter for entity cramming reduction.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugEntityCramming; - - @Config.Comment("Debug parameter for gregtech.api.util.GT_ChunkAssociatedData") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugWorldData; - - @Config.Comment("Debug parameter for chunk loaders.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean debugChunkloaders; -} diff --git a/src/main/java/gregtech/common/config/gregtech/ConfigFeatures.java b/src/main/java/gregtech/common/config/gregtech/ConfigFeatures.java deleted file mode 100644 index 82a86f9186..0000000000 --- a/src/main/java/gregtech/common/config/gregtech/ConfigFeatures.java +++ /dev/null @@ -1,34 +0,0 @@ -package gregtech.common.config.gregtech; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "features", configSubDirectory = "GregTech", filename = "GregTech") -public class ConfigFeatures { - - @Config.Comment("Controls the stacksize of tree related blocks.") - @Config.DefaultInt(64) - @Config.RequiresMcRestart - public static 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 static int maxOtherBlocksStackSize; - - @Config.Comment("Controls the stacksize of oredicted planks.") - @Config.DefaultInt(64) - @Config.RequiresMcRestart - public static int maxPlankStackSize; - - @Config.Comment("Controls the stacksize of oredicted items used in ore treatment.") - @Config.DefaultInt(64) - @Config.RequiresMcRestart - public static int maxOreStackSize; - - @Config.Comment("Controls the stacksize of IC2 overclocker upgrades.") - @Config.DefaultInt(4) - @Config.RequiresMcRestart - public static int upgradeStackSize; -} diff --git a/src/main/java/gregtech/common/config/gregtech/ConfigGeneral.java b/src/main/java/gregtech/common/config/gregtech/ConfigGeneral.java deleted file mode 100644 index e2ac011d39..0000000000 --- a/src/main/java/gregtech/common/config/gregtech/ConfigGeneral.java +++ /dev/null @@ -1,254 +0,0 @@ -package gregtech.common.config.gregtech; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "general", configSubDirectory = "GregTech", filename = "GregTech") -public class ConfigGeneral { - - @Config.Comment("Control percentage of filled 3x3 chunks. Lower number means less oreveins spawn.") - @Config.DefaultInt(100) - @Config.RequiresMcRestart - public static 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 static 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 static int oreveinMaxPlacementAttempts; - - @Config.Comment("Whether to place small ores as placer ores for an orevein.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean oreveinPlacerOres; - - @Config.Comment("Multiplier to control how many placer ores get generated.") - @Config.DefaultInt(2) - @Config.RequiresMcRestart - public static int oreveinPlacerOresMultiplier; - - @Config.Comment("If true, enables the timber axe (cuts down whole tree in a single hit).") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean timber; - - @Config.Comment("If true, all the GT5U potions are always drinkable.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean drinksAlwaysDrinkable; - - @Config.Comment("if true, shows all the metaitems in creative and in NEI.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean doShowAllItemsInCreative; - - @Config.Comment("if true, makes the GT5U sounds multi-threaded.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean multiThreadedSounds; - - @Config.Comment("Max entity amount in the same block for entity craming.") - @Config.DefaultInt(6) - @Config.RequiresMcRestart - public static int maxEqualEntitiesAtOneSpot; - - @Config.Comment("The chance of success to start a fire from the flint and steel.") - @Config.DefaultInt(30) - @Config.RequiresMcRestart - public static int flintChance; - - @Config.Comment("Entity despawn time.") - @Config.DefaultInt(6000) - @Config.RequiresMcRestart - public static int itemDespawnTime; - - @Config.Comment("If true, allows small boiler automation.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean allowSmallBoilerAutomation; - - @Config.Comment("If true, increases dungeon loots in vanilla structures.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static 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 static boolean axeWhenAdventure; - - @Config.Comment("If true, forces the survival map into adventure mode.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static 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 static boolean hungerEffect; - - @Config.Comment("If true, enables the item oredification of the items in the inventory.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean inventoryUnification; - - @Config.Comment("if true, enables GT5U and GT++ bees.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean GTBees; - - @Config.Comment("if true, enables crafting unification.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean craftingUnification; - - @Config.Comment("If true, nerfs planks recipes.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean nerfedWoodPlank; - - @Config.Comment("if true, reduces the durability of the vanilla tools.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean nerfedVanillaTools; - - @Config.Comment("if true, enables GT5U achievements.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean achievements; - - @Config.Comment("if true, hides unused ores.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean hideUnusedOres; - - @Config.Comment("if true, enables all the materials in GT5U.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean enableAllMaterials; - - @Config.Comment("Controls the amount of tick over the lag averaging is done with the scanner.") - @Config.DefaultInt(25) - @Config.RequiresMcRestart - public static 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 static int millisecondThesholdUntilLagWarning; - - @Config.Comment("if true, drops the content of the machine inventory before exploding.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean explosionItemDrop; - - @Config.Comment("if true, enables the cleanroom multi.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static 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 static boolean lowGravProcessing; - - @Config.Comment("if true, crops need a block below to fully grow.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean cropNeedBlock; - - @Config.Comment("if yes, allows the automatic interactions with the maintenance hatches.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static 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 static boolean mixedOreOnlyYieldsTwoThirdsOfPureOre; - - @Config.Comment("if true, rich ores yield twice as much as normal ores.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean richOreYieldMultiplier; - - @Config.Comment("if true, nether ores yield twice as much as normal ores.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean netherOreYieldMultiplier; - - @Config.Comment("if true, end ores yield twice as much as normal ores.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean endOreYieldMultiplier; - - @Config.Comment("if true, enables GT6 styled pipe connections.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean gt6Pipe; - - @Config.Comment("if true, enables GT6 styled wire connections.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean gt6Cable; - - @Config.Comment("if true, allows GT5U cables to be IC2 power sources.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean ic2EnergySourceCompat; - - @Config.Comment("if true, wires will require soldering material to be connected.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean costlyCableConnection; - - @Config.Comment("if true, crashes on null recipe input.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean crashOnNullRecipeInput; - - @Config.Comment("if true, enable placeholder for material names in lang file.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static 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 static boolean harderMobSpawner; - - @Config.Comment("Controls the minimum distance allowed for the long distance pipelines to form.") - @Config.DefaultInt(64) - @Config.RequiresMcRestart - public static int minimalDistancePoints; - - @Config.Comment("This will set the blacklist of blocks for CTM blocks.") - @Config.DefaultStringList({ "team.chisel.block.BlockRoadLine" }) - @Config.RequiresMcRestart - public static 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 static String[] CTMWhitelist; - - @Config.Comment("if true, logs all the oredict in logs/OreDict.log.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean loggingOreDict; - - @Config.Comment("if true, logs all the oredict in logs/Explosion.log.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean loggingExplosions; - - @Config.Comment("if true, log all the oredict in logs/PlayerActivity.log.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean loggingPlayerActicity; -} diff --git a/src/main/java/gregtech/common/config/gregtech/ConfigHarvestLevel.java b/src/main/java/gregtech/common/config/gregtech/ConfigHarvestLevel.java deleted file mode 100644 index f924ceda8d..0000000000 --- a/src/main/java/gregtech/common/config/gregtech/ConfigHarvestLevel.java +++ /dev/null @@ -1,28 +0,0 @@ -package gregtech.common.config.gregtech; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "harvest_level", - configSubDirectory = "GregTech", - filename = "GregTech") -public class ConfigHarvestLevel { - - @Config.Comment("Activate Harvest Level Change") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean activateHarvestLevelChange; - - @Config.Comment("Maximum harvest level") - @Config.DefaultInt(7) - @Config.RequiresMcRestart - public static int maxHarvestLevel; - - @Config.Comment("GraniteHarvestLevel harvest level") - @Config.DefaultInt(3) - @Config.RequiresMcRestart - public static int graniteHarvestLevel; -} diff --git a/src/main/java/gregtech/common/config/gregtech/ConfigMachines.java b/src/main/java/gregtech/common/config/gregtech/ConfigMachines.java deleted file mode 100644 index 06f6c0c18f..0000000000 --- a/src/main/java/gregtech/common/config/gregtech/ConfigMachines.java +++ /dev/null @@ -1,147 +0,0 @@ -package gregtech.common.config.gregtech; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "machines", configSubDirectory = "GregTech", filename = "GregTech") -public class ConfigMachines { - - @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 static 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.tileEntity.EssentiaHatch", - "magicbees.tileentity.TileEntityApimancersDrainerCommon", - "magicbees.tileentity.TileEntityApimancersDrainerGT" }) - @Config.RequiresMcRestart - public static String[] blacklistedTileEntiyClassNamesForWA; - - @Config.Comment("This will set the percentage how much ReinforcedGlass is Allowed in Cleanroom Walls.") - @Config.DefaultFloat(5.0f) - @Config.RequiresMcRestart - public static float cleanroomGlass; - - @Config.Comment("This will let machines such as drills and pumps chunkload their work area.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean enableChunkloaders; - - @Config.Comment("This will make all chunkloading machines act as World Anchors (true) or Passive Anchors (false).") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean alwaysReloadChunkloaders; - - @Config.Comment("If true, then digital chest with AE2 storage bus will be accessible only through AE2") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean disableDigitalChestsExternalAccess; - - @Config.Comment("If true, machines can explode.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean machineExplosions; - - @Config.Comment("If true, machine can take fire.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean machineFlammable; - - @Config.Comment("If true, explodes if the machine is dismantled without a wrench.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean machineNonWrenchExplosions; - - @Config.Comment("If true, burn the wires on explosion. (by sending IV amps into the cables)") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean machineWireFire; - - @Config.Comment("If true, machine will randomly explode if there is fire on adjacent blocks.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean machineFireExplosions; - - @Config.Comment("If true, will randomly explode if it is raining.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean machineRainExplosions; - - @Config.Comment("If true, will randomly explode during thunderstorm if the machine can be exposed to rain.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean machineThunderExplosions; - - @Config.Comment("If true, enable the guis of the machines to get a tint and it will be of the color of the dye applied to the machine.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean coloredGUI; - - @Config.Comment("If true and if the machine tint is activated, the guis will have a uniform metallic tint no matter what color is applied to the machines.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean machineMetalGUI; - - // Implementation for this is actually handled in NewHorizonsCoreMod in MainRegistry.java! - @Config.Comment("If true, use the definition of the metallic tint in GT5U, otherwise NHCore will set it to white.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean useMachineMetal; - - @Config.Comment("if true, enables MuTEs(multitile entities) to be added to the game. MuTEs are in the start of development and its not recommended to enable them unless you know what you are doing. (always activated in dev env)") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean enableMultiTileEntities; -} diff --git a/src/main/java/gregtech/common/config/gregtech/ConfigOreDropBehavior.java b/src/main/java/gregtech/common/config/gregtech/ConfigOreDropBehavior.java deleted file mode 100644 index dd6e1420e2..0000000000 --- a/src/main/java/gregtech/common/config/gregtech/ConfigOreDropBehavior.java +++ /dev/null @@ -1,24 +0,0 @@ -package gregtech.common.config.gregtech; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "ore_drop_behavior", - configSubDirectory = "GregTech", - filename = "GregTech") -public class ConfigOreDropBehavior { - - @Config.Comment({ "Settings:", - " - 'PerDimBlock': Sets the drop to the block variant of the ore block based on dimension, defaults to stone type", - " - 'UnifiedBlock': Sets the drop to the stone variant of the ore block", - " - 'Block': Sets the drop to the ore mined", - " - 'FortuneItem': Sets the drop to the new ore item and makes it affected by fortune" - + " - 'Item': Sets the drop to the new ore item" }) - - @Config.DefaultString("FortuneItem") - @Config.RequiresMcRestart - public static String setting; -} diff --git a/src/main/java/gregtech/common/config/gregtech/ConfigPollution.java b/src/main/java/gregtech/common/config/gregtech/ConfigPollution.java deleted file mode 100644 index a78fff8f8c..0000000000 --- a/src/main/java/gregtech/common/config/gregtech/ConfigPollution.java +++ /dev/null @@ -1,129 +0,0 @@ -package gregtech.common.config.gregtech; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "pollution", configSubDirectory = "GregTech", filename = "GregTech") -public class ConfigPollution { - - @Config.Comment("if true, enables pollution in the game.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean pollution; - - @Config.Comment("Controls the threshold starting from which you can see fog.") - @Config.DefaultInt(550_000) - @Config.RequiresMcRestart - public static int pollutionSmogLimit; - @Config.Comment("Controls the threshold starting from which players get poison effect.") - @Config.DefaultInt(750_000) - @Config.RequiresMcRestart - public static int pollutionPoisonLimit; - @Config.Comment("Controls the threshold starting from which vegetation starts to be killed.") - @Config.DefaultInt(1_000_000) - @Config.RequiresMcRestart - public static int pollutionVegetationLimit; - @Config.Comment("Controls the threshold starting from which if it rains, will turn cobblestone into gravel and gravel into sand.") - @Config.DefaultInt(2_000_000) - @Config.RequiresMcRestart - public static int pollutionSourRainLimit; - @Config.Comment("Controls the pollution released by an explosion.") - @Config.DefaultInt(100_000) - @Config.RequiresMcRestart - public static int pollutionOnExplosion; - @Config.Comment("Controls the pollution released per second by the bricked blast furnace.") - @Config.DefaultInt(200) - @Config.RequiresMcRestart - public static int pollutionPrimitveBlastFurnacePerSecond; - @Config.Comment("Controls the pollution released per second by the charcoal pile igniter.") - @Config.DefaultInt(100) - @Config.RequiresMcRestart - public static int pollutionCharcoalPitPerSecond; - @Config.Comment("Controls the pollution released per second by the EBF.") - @Config.DefaultInt(400) - @Config.RequiresMcRestart - public static int pollutionEBFPerSecond; - @Config.Comment("Controls the pollution released per second by the large combustion engine.") - @Config.DefaultInt(480) - @Config.RequiresMcRestart - public static int pollutionLargeCombustionEnginePerSecond; - @Config.Comment("Controls the pollution released per second by the extreme combustion engine.") - @Config.DefaultInt(3_840) - @Config.RequiresMcRestart - public static int pollutionExtremeCombustionEnginePerSecond; - @Config.Comment("Controls the pollution released per second by the implosion compressor.") - @Config.DefaultInt(10_000) - @Config.RequiresMcRestart - public static int pollutionImplosionCompressorPerSecond; - @Config.Comment("Controls the pollution released per second by the large bronze boiler.") - @Config.DefaultInt(1_000) - @Config.RequiresMcRestart - public static int pollutionLargeBronzeBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the large steel boiler.") - @Config.DefaultInt(2_000) - @Config.RequiresMcRestart - public static int pollutionLargeSteelBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the large titanium boiler.") - @Config.DefaultInt(3_000) - @Config.RequiresMcRestart - public static int pollutionLargeTitaniumBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the large tungstensteel boiler.") - @Config.DefaultInt(4_000) - @Config.RequiresMcRestart - public static int pollutionLargeTungstenSteelBoilerPerSecond; - @Config.Comment("Controls the pollution reduction obtained with each increment of the circuit when throttling large boilers.") - @Config.DefaultFloat(1.0f / 24.0f) // divided by 24 because there are 24 circuit configs. - @Config.RequiresMcRestart - public static float pollutionReleasedByThrottle; - @Config.Comment("Controls the pollution released per second by the large gas turbine.") - @Config.DefaultInt(300) - @Config.RequiresMcRestart - public static int pollutionLargeGasTurbinePerSecond; - @Config.Comment("Controls the pollution released per second by the multi smelter.") - @Config.DefaultInt(400) - @Config.RequiresMcRestart - public static int pollutionMultiSmelterPerSecond; - @Config.Comment("Controls the pollution released per second by the pyrolyse oven.") - @Config.DefaultInt(300) - @Config.RequiresMcRestart - public static int pollutionPyrolyseOvenPerSecond; - @Config.Comment("Controls the pollution released per second by the small coil boiler.") - @Config.DefaultInt(20) - @Config.RequiresMcRestart - public static int pollutionSmallCoalBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the high pressure lava boiler.") - @Config.DefaultInt(20) - @Config.RequiresMcRestart - public static int pollutionHighPressureLavaBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the high pressure coil boiler.") - @Config.DefaultInt(30) - @Config.RequiresMcRestart - public static int pollutionHighPressureCoalBoilerPerSecond; - - @Config.Comment("Controls the pollution released per second by the base diesel generator.") - @Config.DefaultInt(40) - @Config.RequiresMcRestart - public static int pollutionBaseDieselGeneratorPerSecond; - - // reading double as strings, not perfect, but better than nothing - @Config.Comment({ - "Pollution released by tier, with the following formula: PollutionBaseDieselGeneratorPerSecond * PollutionDieselGeneratorReleasedByTier[Tier]", - "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." }) - @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8 }) - @Config.RequiresMcRestart - public static double[] pollutionDieselGeneratorReleasedByTier; - - @Config.Comment("Controls the pollution released per second by the base gas turbine.") - @Config.DefaultInt(40) - @Config.RequiresMcRestart - public static int pollutionBaseGasTurbinePerSecond; - - // reading double as strings, not perfect, but better than nothing - @Config.Comment({ - "Pollution released by tier, with the following formula: PollutionBaseGasTurbinePerSecond * PollutionGasTurbineReleasedByTier[Tier]", - "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." }) - @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8, 0.7, 0.6 }) - @Config.RequiresMcRestart - public static double[] pollutionGasTurbineReleasedByTier; -} diff --git a/src/main/java/gregtech/common/config/machinestats/ConfigBronzeSolarBoiler.java b/src/main/java/gregtech/common/config/machinestats/ConfigBronzeSolarBoiler.java deleted file mode 100644 index 59042b7e41..0000000000 --- a/src/main/java/gregtech/common/config/machinestats/ConfigBronzeSolarBoiler.java +++ /dev/null @@ -1,32 +0,0 @@ -package gregtech.common.config.machinestats; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "bronze_solar_boiler", - configSubDirectory = "GregTech", - filename = "MachineStats") -public class ConfigBronzeSolarBoiler { - - @Config.Comment({ "Number of run-time ticks before boiler starts calcification.", - "100% calcification and minimal output will be reached at 2 times this." }) - @Config.DefaultInt(1_080_000) - @Config.RequiresMcRestart - public static int calcificationTicks; - - @Config.Comment("Number of ticks it takes to lose 1°C.") - @Config.DefaultInt(45) - @Config.RequiresMcRestart - public static int cooldownTicks; - - @Config.DefaultInt(120) - @Config.RequiresMcRestart - public static int maxOutputPerSecond; - - @Config.DefaultInt(40) - @Config.RequiresMcRestart - public static int minOutputPerSecond; -} diff --git a/src/main/java/gregtech/common/config/machinestats/ConfigMachines.java b/src/main/java/gregtech/common/config/machinestats/ConfigMachines.java deleted file mode 100644 index ed93f31629..0000000000 --- a/src/main/java/gregtech/common/config/machinestats/ConfigMachines.java +++ /dev/null @@ -1,34 +0,0 @@ -package gregtech.common.config.machinestats; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config(modid = Mods.Names.GREG_TECH, category = "machines", configSubDirectory = "GregTech", filename = "MachineStats") -public class ConfigMachines { - - @Config.Comment("Controls the damageFactorLow variable in the maintenance damage equation.") - @Config.DefaultInt(5) - @Config.RequiresMcRestart - public static int damageFactorLow; - - @Config.Comment("Controls the damageFactorHigh variable in the maintenance damage equation.") - @Config.DefaultFloat(0.6f) - @Config.RequiresMcRestart - public static float damageFactorHigh; - - @Config.Comment("if true, disable maintenance checks.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean disableMaintenanceChecks; - - @Config.Comment("If true, allows for multiple eggs on the magical energy absorber.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean allowMultipleEggs; - - @Config.Comment("If true, requires at least a free face to open a machine gui.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean forceFreeFace; -} diff --git a/src/main/java/gregtech/common/config/machinestats/ConfigMassFabricator.java b/src/main/java/gregtech/common/config/machinestats/ConfigMassFabricator.java deleted file mode 100644 index 13cf89470b..0000000000 --- a/src/main/java/gregtech/common/config/machinestats/ConfigMassFabricator.java +++ /dev/null @@ -1,33 +0,0 @@ -package gregtech.common.config.machinestats; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "mass_fabricator", - configSubDirectory = "GregTech", - filename = "MachineStats") -public class ConfigMassFabricator { - - @Config.Comment("if true, requires UUA to run the mass fab.") - @Config.DefaultBoolean(false) - @Config.RequiresMcRestart - public static boolean requiresUUA; - - @Config.Comment("Duration multiplier.") - @Config.DefaultInt(3215) - @Config.RequiresMcRestart - public static int durationMultiplier; - - @Config.Comment("mb of UUA per UUM.") - @Config.DefaultInt(1) - @Config.RequiresMcRestart - public static int UUAPerUUM; - - @Config.Comment("Speed bonus delivered by the UUA.") - @Config.DefaultInt(40) - @Config.RequiresMcRestart - public static int UUASpeedBonus; -} diff --git a/src/main/java/gregtech/common/config/machinestats/ConfigMicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/config/machinestats/ConfigMicrowaveEnergyTransmitter.java deleted file mode 100644 index 6efec5ca12..0000000000 --- a/src/main/java/gregtech/common/config/machinestats/ConfigMicrowaveEnergyTransmitter.java +++ /dev/null @@ -1,28 +0,0 @@ -package gregtech.common.config.machinestats; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "microwave_energy_transmitter", - configSubDirectory = "GregTech", - filename = "MachineStats") -public class ConfigMicrowaveEnergyTransmitter { - - @Config.Comment("if true, it has a passive energy loss.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean passiveEnergyUse; - - @Config.Comment("max loss.") - @Config.DefaultInt(50) - @Config.RequiresMcRestart - public static int maxLoss; - - @Config.Comment("max loss distance.") - @Config.DefaultInt(10_000) - @Config.RequiresMcRestart - public static int maxLossDistance; -} diff --git a/src/main/java/gregtech/common/config/machinestats/ConfigSteelSolarBoiler.java b/src/main/java/gregtech/common/config/machinestats/ConfigSteelSolarBoiler.java deleted file mode 100644 index c6f6ea9f2a..0000000000 --- a/src/main/java/gregtech/common/config/machinestats/ConfigSteelSolarBoiler.java +++ /dev/null @@ -1,32 +0,0 @@ -package gregtech.common.config.machinestats; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "steel_solar_boiler", - configSubDirectory = "GregTech", - filename = "MachineStats") -public class ConfigSteelSolarBoiler { - - @Config.Comment({ "Number of run-time ticks before boiler starts calcification.", - "100% calcification and minimal output will be reached at 2 times this." }) - @Config.DefaultInt(1_080_000) - @Config.RequiresMcRestart - public static int calcificationTicks; - - @Config.Comment("Number of ticks it takes to lose 1°C.") - @Config.DefaultInt(75) - @Config.RequiresMcRestart - public static int cooldownTicks; - - @Config.DefaultInt(360) - @Config.RequiresMcRestart - public static int maxOutputPerSecond; - - @Config.DefaultInt(120) - @Config.RequiresMcRestart - public static int minOutputPerSecond; -} diff --git a/src/main/java/gregtech/common/config/machinestats/ConfigTeleporter.java b/src/main/java/gregtech/common/config/machinestats/ConfigTeleporter.java deleted file mode 100644 index 26f1f8fb4d..0000000000 --- a/src/main/java/gregtech/common/config/machinestats/ConfigTeleporter.java +++ /dev/null @@ -1,28 +0,0 @@ -package gregtech.common.config.machinestats; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "teleporter", - configSubDirectory = "GregTech", - filename = "MachineStats") -public class ConfigTeleporter { - - @Config.Comment("if true, allows interdim tp") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean interDimensionalTPAllowed; - - @Config.Comment("passive energy loss.") - @Config.DefaultInt(2048) - @Config.RequiresMcRestart - public static int passiveEnergyDrain; - - @Config.Comment("power multiplier.") - @Config.DefaultInt(100) - @Config.RequiresMcRestart - public static int powerMultiplier; -} diff --git a/src/main/java/gregtech/common/config/worldgen/ConfigEndAsteroids.java b/src/main/java/gregtech/common/config/worldgen/ConfigEndAsteroids.java deleted file mode 100644 index c1ec0125b5..0000000000 --- a/src/main/java/gregtech/common/config/worldgen/ConfigEndAsteroids.java +++ /dev/null @@ -1,33 +0,0 @@ -package gregtech.common.config.worldgen; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "end_asteroids", - configSubDirectory = "GregTech", - filename = "WorldGeneration") -public class ConfigEndAsteroids { - - @Config.Comment("The maximum size for the end asteroids.") - @Config.DefaultInt(200) - @Config.RequiresMcRestart - public static int EndAsteroidMaxSize; - - @Config.Comment("The minimum size for the end asteroids.") - @Config.DefaultInt(200) - @Config.RequiresMcRestart - public static int EndAsteroidMinSize; - - @Config.Comment("The probability weight to generate end asteroids.") - @Config.DefaultInt(300) - @Config.RequiresMcRestart - public static int EndAsteroidProbability; - - @Config.Comment("if true, enables end asteroids.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean generateEndAsteroids; -} diff --git a/src/main/java/gregtech/common/config/worldgen/ConfigGeneral.java b/src/main/java/gregtech/common/config/worldgen/ConfigGeneral.java deleted file mode 100644 index c978f35365..0000000000 --- a/src/main/java/gregtech/common/config/worldgen/ConfigGeneral.java +++ /dev/null @@ -1,48 +0,0 @@ -package gregtech.common.config.worldgen; - -import com.gtnewhorizon.gtnhlib.config.Config; - -import gregtech.api.enums.Mods; - -@Config( - modid = Mods.Names.GREG_TECH, - category = "general", - configSubDirectory = "GregTech", - filename = "WorldGeneration") -public class ConfigGeneral { - - @Config.Comment("if true, enables basalt ore gen.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean generateBasaltOres; - - @Config.Comment("if true, enables black granite ore gen.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean generateBlackGraniteOres; - - @Config.Comment("if true, enables marble ore gen.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean generateMarbleOres; - - @Config.Comment("if true, enables red granite ore gen.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean generateRedGraniteOres; - - @Config.Comment("If true, disables vanilla oregen.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean disableVanillaOres; - - @Config.Comment("if true, enables underground dirt gen. Does nothing if the vanilla oregen is enabled!") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean generateUndergroundDirtGen; - - @Config.Comment("if true, enables underground gravel gen. Does nothing if the vanilla oregen is enabled!") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public static boolean generateUndergroundGravelGen; -} diff --git a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java index d1d7e1f9b1..9afdb22673 100644 --- a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java +++ b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java @@ -500,7 +500,7 @@ import gregtech.api.util.GTModHandler; import gregtech.api.util.GTOreDictUnificator; import gregtech.api.util.GTRecipe; import gregtech.api.util.GTUtility; -import gregtech.common.config.other.ConfigGeneral; +import gregtech.common.config.Other; import gregtech.common.covers.CoverArm; import gregtech.common.covers.CoverChest; import gregtech.common.covers.CoverControlsWork; @@ -4585,7 +4585,7 @@ public class MetaGeneratedItem01 extends MetaGeneratedItemX32 { ItemList.Spray_Empty.get(1L), ItemList.SPRAY_CAN_DYES_USED[i].get(1L), ItemList.SPRAY_CAN_DYES[i].get(1L), - ConfigGeneral.sprayCanUses, + Other.sprayCanUses, i); addItemBehavior(32000 + Spray_Colors[i], behaviourSprayColor); addItemBehavior(32000 + Spray_Colors_Used[i], behaviourSprayColor); diff --git a/src/main/java/gregtech/common/items/behaviors/BehaviourSprayColor.java b/src/main/java/gregtech/common/items/behaviors/BehaviourSprayColor.java index 275b304e87..8c655907f2 100644 --- a/src/main/java/gregtech/common/items/behaviors/BehaviourSprayColor.java +++ b/src/main/java/gregtech/common/items/behaviors/BehaviourSprayColor.java @@ -25,7 +25,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.MetaBaseItem; import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTUtility; -import gregtech.common.config.other.ConfigGeneral; +import gregtech.common.config.Other; public class BehaviourSprayColor extends BehaviourNone { @@ -91,7 +91,7 @@ public class BehaviourSprayColor extends BehaviourNone { long tUses = getUses(aStack, tNBT); int painted = 0; - int maxPainted = ConfigGeneral.sprayCanChainRange; + int maxPainted = Other.sprayCanChainRange; ForgeDirection lookSide; Vec3 look = aPlayer.getLookVec(); double absX = Math.abs(look.xCoord); @@ -221,7 +221,7 @@ public class BehaviourSprayColor extends BehaviourNone { public List<String> getAdditionalToolTips(MetaBaseItem aItem, List<String> aList, ItemStack aStack) { aList.add(this.mTooltip); aList.add(this.mTooltipChain); - aList.add(String.format(this.mTooltipChainAmount, ConfigGeneral.sprayCanChainRange)); + aList.add(String.format(this.mTooltipChainAmount, Other.sprayCanChainRange)); NBTTagCompound tNBT = aStack.getTagCompound(); long tRemainingPaint = tNBT == null ? this.mUses : GTUtility.areStacksEqual(aStack, this.mFull, true) ? this.mUses : tNBT.getLong("GT.RemainingPaint"); diff --git a/src/main/java/gregtech/common/items/behaviors/BehaviourSprayColorInfinite.java b/src/main/java/gregtech/common/items/behaviors/BehaviourSprayColorInfinite.java index 4eb4fb565c..6f7d99fe3a 100644 --- a/src/main/java/gregtech/common/items/behaviors/BehaviourSprayColorInfinite.java +++ b/src/main/java/gregtech/common/items/behaviors/BehaviourSprayColorInfinite.java @@ -16,7 +16,7 @@ import gregtech.api.enums.GTValues; import gregtech.api.items.MetaBaseItem; import gregtech.api.net.GTPacketInfiniteSpraycan; import gregtech.api.util.GTLanguageManager; -import gregtech.common.config.other.ConfigGeneral; +import gregtech.common.config.Other; public class BehaviourSprayColorInfinite extends BehaviourSprayColor { @@ -32,14 +32,14 @@ public class BehaviourSprayColorInfinite extends BehaviourSprayColor { private byte mCurrentColor; public BehaviourSprayColorInfinite(ItemStack sprayCan) { - super(sprayCan, sprayCan, sprayCan, ConfigGeneral.sprayCanChainRange, 0); + super(sprayCan, sprayCan, sprayCan, Other.sprayCanChainRange, 0); this.mTooltip = ""; mCurrentColor = 0; } @Override protected long getUses(ItemStack aStack, NBTTagCompound tNBT) { - return ConfigGeneral.sprayCanChainRange; + return Other.sprayCanChainRange; } @Override diff --git a/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerSolar.java b/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerSolar.java index 0fc23f59cf..0628f877e6 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerSolar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerSolar.java @@ -26,7 +26,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTModHandler; import gregtech.api.util.GTUtility; -import gregtech.common.config.machinestats.ConfigBronzeSolarBoiler; +import gregtech.common.config.MachineStats; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; @@ -38,10 +38,10 @@ public class MTEBoilerSolar extends MTEBoiler { "Steam Power by the Sun%n" + "Produces %sL of Steam per second%n" + "Calcifies over time, reducing Steam output to %sL/s%n" + "Break and replace to descale"); - protected int calcificationTicks = ConfigBronzeSolarBoiler.calcificationTicks; - protected int cooldownTicks = ConfigBronzeSolarBoiler.cooldownTicks; - protected int maxOutputPerSecond = ConfigBronzeSolarBoiler.maxOutputPerSecond; - protected int minOutputPerSecond = ConfigBronzeSolarBoiler.minOutputPerSecond; + protected int calcificationTicks = MachineStats.bronzeSolarBoiler.calcificationTicks; + protected int cooldownTicks = MachineStats.bronzeSolarBoiler.cooldownTicks; + protected int maxOutputPerSecond = MachineStats.bronzeSolarBoiler.maxOutputPerSecond; + protected int minOutputPerSecond = MachineStats.bronzeSolarBoiler.minOutputPerSecond; protected final int basicTemperatureMod = 5; // Base Celsius gain or loss private int mRunTimeTicks = 0; diff --git a/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerSolarSteel.java b/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerSolarSteel.java index b46beca108..1f53123083 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerSolarSteel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/MTEBoilerSolarSteel.java @@ -7,7 +7,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.render.TextureFactory; -import gregtech.common.config.machinestats.ConfigSteelSolarBoiler; +import gregtech.common.config.MachineStats; public class MTEBoilerSolarSteel extends MTEBoilerSolar { @@ -27,10 +27,10 @@ public class MTEBoilerSolarSteel extends MTEBoilerSolar { } protected void initBoilerStats() { - calcificationTicks = ConfigSteelSolarBoiler.calcificationTicks; - cooldownTicks = ConfigSteelSolarBoiler.cooldownTicks; - maxOutputPerSecond = ConfigSteelSolarBoiler.maxOutputPerSecond; - minOutputPerSecond = ConfigSteelSolarBoiler.minOutputPerSecond; + calcificationTicks = MachineStats.steelSolarBoiler.calcificationTicks; + cooldownTicks = MachineStats.steelSolarBoiler.cooldownTicks; + maxOutputPerSecond = MachineStats.steelSolarBoiler.maxOutputPerSecond; + minOutputPerSecond = MachineStats.steelSolarBoiler.minOutputPerSecond; } @Override diff --git a/src/main/java/gregtech/common/tileentities/generators/MTEMagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/MTEMagicalEnergyAbsorber.java index c49102ad61..01d2e1ee07 100644 --- a/src/main/java/gregtech/common/tileentities/generators/MTEMagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/MTEMagicalEnergyAbsorber.java @@ -64,7 +64,7 @@ import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTLog; import gregtech.api.util.GTUtility; import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder; -import gregtech.common.config.machinestats.ConfigMachines; +import gregtech.common.config.MachineStats; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.AspectSourceHelper; @@ -111,7 +111,7 @@ public class MTEMagicalEnergyAbsorber extends MTEBasicGenerator implements Magic * Populates static variables dependant on config settings */ private static void sharedConfigLoad() { - sAllowMultipleEggs = ConfigMachines.allowMultipleEggs; + sAllowMultipleEggs = MachineStats.machines.allowMultipleEggs; if (Thaumcraft.isModLoaded()) { for (Aspect tAspect : Aspect.aspects.values()) { // noinspection UnstableApiUsage diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/MTEMassfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/MTEMassfabricator.java index 195d2317de..899cc01f7c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/MTEMassfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/MTEMassfabricator.java @@ -42,7 +42,7 @@ import gregtech.api.util.GTRecipe; import gregtech.api.util.GTUtility; import gregtech.api.util.MethodsReturnNonnullByDefault; import gregtech.api.util.OverclockCalculator; -import gregtech.common.config.machinestats.ConfigMassFabricator; +import gregtech.common.config.MachineStats; public class MTEMassfabricator extends MTEBasicMachine { @@ -136,10 +136,10 @@ public class MTEMassfabricator extends MTEBasicMachine { @Override public void onConfigLoad() { super.onConfigLoad(); - sDurationMultiplier = ConfigMassFabricator.durationMultiplier; - sUUAperUUM = ConfigMassFabricator.UUAPerUUM; - sUUASpeedBonus = ConfigMassFabricator.UUASpeedBonus; - sRequiresUUA = ConfigMassFabricator.requiresUUA; + sDurationMultiplier = MachineStats.massFabricator.durationMultiplier; + sUUAperUUM = MachineStats.massFabricator.UUAPerUUM; + sUUASpeedBonus = MachineStats.massFabricator.UUASpeedBonus; + sRequiresUUA = MachineStats.massFabricator.requiresUUA; Materials.UUAmplifier.mChemicalFormula = ("Mass Fabricator Eff/Speed Bonus: x" + sUUASpeedBonus); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/MTEMicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/MTEMicrowaveEnergyTransmitter.java index 52d38beba0..c8b0c966e3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/MTEMicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/MTEMicrowaveEnergyTransmitter.java @@ -42,8 +42,7 @@ import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicTank; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; -import gregtech.common.config.machinestats.ConfigMicrowaveEnergyTransmitter; -import gregtech.common.config.machinestats.ConfigTeleporter; +import gregtech.common.config.MachineStats; public class MTEMicrowaveEnergyTransmitter extends MTEBasicTank implements IAddGregtechLogo, IAddUIWidgets { @@ -148,10 +147,10 @@ public class MTEMicrowaveEnergyTransmitter extends MTEBasicTank implements IAddG @Override public void onConfigLoad() { - sInterDimensionalTeleportAllowed = ConfigTeleporter.interDimensionalTPAllowed; - mMaxLoss = Math.max(ConfigMicrowaveEnergyTransmitter.maxLoss, 11); - mMaxLossDistance = ConfigMicrowaveEnergyTransmitter.maxLossDistance; - mPassiveEnergyUse = ConfigMicrowaveEnergyTransmitter.passiveEnergyUse; + sInterDimensionalTeleportAllowed = MachineStats.teleporter.interDimensionalTPAllowed; + mMaxLoss = Math.max(MachineStats.microwaveEnergyTransmitter.maxLoss, 11); + mMaxLossDistance = MachineStats.microwaveEnergyTransmitter.maxLossDistance; + mPassiveEnergyUse = MachineStats.microwaveEnergyTransmitter.passiveEnergyUse; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/MTETeleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/MTETeleporter.java index cb7d6d6d71..f1d09f6b75 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/MTETeleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/MTETeleporter.java @@ -61,7 +61,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicTank; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; -import gregtech.common.config.machinestats.ConfigTeleporter; +import gregtech.common.config.MachineStats; public class MTETeleporter extends MTEBasicTank implements IAddGregtechLogo, IAddUIWidgets { @@ -245,9 +245,9 @@ public class MTETeleporter extends MTEBasicTank implements IAddGregtechLogo, IAd @Override public void onConfigLoad() { - sInterDimensionalTeleportAllowed = ConfigTeleporter.interDimensionalTPAllowed; - sPassiveEnergyDrain = ConfigTeleporter.passiveEnergyDrain; - sPowerMultiplyer = ConfigTeleporter.powerMultiplier; + sInterDimensionalTeleportAllowed = MachineStats.teleporter.interDimensionalTPAllowed; + sPassiveEnergyDrain = MachineStats.teleporter.passiveEnergyDrain; + sPowerMultiplyer = MachineStats.teleporter.powerMultiplier; sFPowerMultiplyer = sPowerMultiplyer / 100.0; } diff --git a/src/main/java/gregtech/loaders/preload/GTPreLoad.java b/src/main/java/gregtech/loaders/preload/GTPreLoad.java index 34fcfe86d3..6216f752dc 100644 --- a/src/main/java/gregtech/loaders/preload/GTPreLoad.java +++ b/src/main/java/gregtech/loaders/preload/GTPreLoad.java @@ -10,7 +10,6 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.PrintStream; -import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -29,34 +28,23 @@ import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.LoadController; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.discovery.ASMDataTable; -import cpw.mods.fml.common.discovery.ModDiscoverer; import gregtech.GTMod; import gregtech.api.GregTechAPI; import gregtech.api.enums.Dyes; import gregtech.api.enums.GTValues; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.recipe.RecipeCategory; -import gregtech.api.recipe.RecipeCategoryHolder; -import gregtech.api.recipe.RecipeCategorySetting; import gregtech.api.util.GTConfig; import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTLog; import gregtech.api.util.GTModHandler; import gregtech.api.util.GTRecipeBuilder; import gregtech.api.util.GTUtility; -import gregtech.common.GTProxy; -import gregtech.common.config.client.ConfigColorModulation; -import gregtech.common.config.client.ConfigInterface; -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.ConfigMachines; -import gregtech.common.config.gregtech.ConfigOreDropBehavior; -import gregtech.common.config.gregtech.ConfigPollution; +import gregtech.common.config.Client; +import gregtech.common.config.Gregtech; +import gregtech.common.config.MachineStats; +import gregtech.common.config.OPStuff; +import gregtech.common.config.Worldgen; import gregtech.common.tileentities.machines.long_distance.MTELongDistancePipelineBase; import gregtech.common.tileentities.machines.multi.MTECleanroom; @@ -148,10 +136,6 @@ public class GTPreLoad { GTConfig.undergroundFluidsFile = new Configuration(tFile); GTConfig.undergroundFluidsFile.load(); GTConfig.undergroundFluidsFile.save(); - - GregTechAPI.NEIClientFIle = new GTConfig( - new Configuration(new File(new File(configDir, "GregTech"), "NEIClient.cfg"))); - } public static void createLogFiles(File parentFile) { @@ -165,7 +149,7 @@ public class GTPreLoad { GTLog.out = GTLog.err = new PrintStream(GTLog.mLogFile); } catch (FileNotFoundException ignored) {} - if (ConfigGeneral.loggingOreDict) { + if (Gregtech.general.loggingOreDict) { GTLog.mOreDictLogFile = new File(parentFile, "logs/OreDict.log"); if (!GTLog.mOreDictLogFile.exists()) { try { @@ -184,7 +168,7 @@ public class GTPreLoad { GTLog.ore.println("******************************************************************************"); tList.forEach(GTLog.ore::println); } - if (ConfigGeneral.loggingExplosions) { + if (Gregtech.general.loggingExplosions) { GTLog.mExplosionLog = new File(parentFile, "logs/Explosion.log"); if (!GTLog.mExplosionLog.exists()) { try { @@ -196,7 +180,7 @@ public class GTPreLoad { } catch (Throwable ignored) {} } - if (ConfigGeneral.loggingPlayerActicity) { + if (Gregtech.general.loggingPlayerActicity) { GTLog.mPlayerActivityLogFile = new File(parentFile, "logs/PlayerActivity.log"); if (!GTLog.mPlayerActivityLogFile.exists()) { try { @@ -372,124 +356,124 @@ public class GTPreLoad { public static void loadConfig() { // general - GTValues.D1 = ConfigDebug.D1; - GTValues.D2 = ConfigDebug.D2; - GTValues.allow_broken_recipemap = ConfigDebug.allowBrokenRecipeMap; - GTValues.debugCleanroom = ConfigDebug.debugCleanroom; - GTValues.debugDriller = ConfigDebug.debugDriller; - GTValues.debugWorldGen = ConfigDebug.debugWorldgen; - GTValues.debugOrevein = ConfigDebug.debugOrevein; - GTValues.debugSmallOres = ConfigDebug.debugSmallOres; - GTValues.debugStones = ConfigDebug.debugStones; - GTValues.debugBlockMiner = ConfigDebug.debugBlockMiner; - GTValues.debugBlockPump = ConfigDebug.debugBlockPump; - GTValues.debugEntityCramming = ConfigDebug.debugEntityCramming; - GTValues.debugWorldData = ConfigDebug.debugWorldData; - GTValues.oreveinPercentage = ConfigGeneral.oreveinPercentage; - GTValues.oreveinAttempts = ConfigGeneral.oreveinAttempts; - GTValues.oreveinMaxPlacementAttempts = ConfigGeneral.oreveinMaxPlacementAttempts; - GTValues.oreveinPlacerOres = ConfigGeneral.oreveinPlacerOres; - GTValues.oreveinPlacerOresMultiplier = ConfigGeneral.oreveinPlacerOresMultiplier; - GregTechAPI.TICKS_FOR_LAG_AVERAGING = ConfigGeneral.ticksForLagAveraging; - GregTechAPI.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = ConfigGeneral.millisecondThesholdUntilLagWarning; - GregTechAPI.sTimber = ConfigGeneral.timber; - GregTechAPI.sDrinksAlwaysDrinkable = ConfigGeneral.drinksAlwaysDrinkable; - GregTechAPI.sDoShowAllItemsInCreative = ConfigGeneral.doShowAllItemsInCreative; - GregTechAPI.sMultiThreadedSounds = ConfigGeneral.multiThreadedSounds; - GTMod.gregtechproxy.mMaxEqualEntitiesAtOneSpot = ConfigGeneral.maxEqualEntitiesAtOneSpot; - GTMod.gregtechproxy.mFlintChance = ConfigGeneral.flintChance; - GTMod.gregtechproxy.mItemDespawnTime = ConfigGeneral.itemDespawnTime; - GTMod.gregtechproxy.mAllowSmallBoilerAutomation = ConfigGeneral.allowSmallBoilerAutomation; - GTMod.gregtechproxy.mDisableVanillaOres = gregtech.common.config.worldgen.ConfigGeneral.disableVanillaOres; - GTMod.gregtechproxy.mIncreaseDungeonLoot = ConfigGeneral.increaseDungeonLoot; - GTMod.gregtechproxy.mAxeWhenAdventure = ConfigGeneral.axeWhenAdventure; - GTMod.gregtechproxy.mSurvivalIntoAdventure = ConfigGeneral.survivalIntoAdventure; - GTMod.gregtechproxy.mHungerEffect = ConfigGeneral.hungerEffect; - GTMod.gregtechproxy.mInventoryUnification = ConfigGeneral.inventoryUnification; - GTMod.gregtechproxy.mGTBees = ConfigGeneral.GTBees; - GTMod.gregtechproxy.mCraftingUnification = ConfigGeneral.craftingUnification; - GTMod.gregtechproxy.mNerfedWoodPlank = ConfigGeneral.nerfedWoodPlank; - GTMod.gregtechproxy.mNerfedVanillaTools = ConfigGeneral.nerfedVanillaTools; - GTMod.gregtechproxy.mAchievements = ConfigGeneral.achievements; - GTMod.gregtechproxy.mHideUnusedOres = ConfigGeneral.hideUnusedOres; - GTMod.gregtechproxy.mEnableAllMaterials = ConfigGeneral.enableAllMaterials; - GTMod.gregtechproxy.mExplosionItemDrop = ConfigGeneral.explosionItemDrop; - GTMod.gregtechproxy.mEnableCleanroom = ConfigGeneral.enableCleanroom; - GTMod.gregtechproxy.mLowGravProcessing = GalacticraftCore.isModLoaded() && ConfigGeneral.lowGravProcessing; - GTMod.gregtechproxy.mCropNeedBlock = ConfigGeneral.cropNeedBlock; - GTMod.gregtechproxy.mAMHInteraction = ConfigGeneral.autoMaintenaceHatchesInteraction; - GTMod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre = ConfigGeneral.mixedOreOnlyYieldsTwoThirdsOfPureOre; - GTMod.gregtechproxy.mRichOreYieldMultiplier = ConfigGeneral.richOreYieldMultiplier; - GTMod.gregtechproxy.mNetherOreYieldMultiplier = ConfigGeneral.netherOreYieldMultiplier; - GTMod.gregtechproxy.mEndOreYieldMultiplier = ConfigGeneral.endOreYieldMultiplier; - GTMod.gregtechproxy.gt6Pipe = ConfigGeneral.gt6Pipe; - GTMod.gregtechproxy.gt6Cable = ConfigGeneral.gt6Cable; - GTMod.gregtechproxy.ic2EnergySourceCompat = ConfigGeneral.ic2EnergySourceCompat; - GTMod.gregtechproxy.costlyCableConnection = ConfigGeneral.costlyCableConnection; - GTMod.gregtechproxy.crashOnNullRecipeInput = ConfigGeneral.crashOnNullRecipeInput; + GTValues.D1 = Gregtech.debug.D1; + GTValues.D2 = Gregtech.debug.D2; + GTValues.allow_broken_recipemap = Gregtech.debug.allowBrokenRecipeMap; + GTValues.debugCleanroom = Gregtech.debug.debugCleanroom; + GTValues.debugDriller = Gregtech.debug.debugDriller; + GTValues.debugWorldGen = Gregtech.debug.debugWorldgen; + GTValues.debugOrevein = Gregtech.debug.debugOrevein; + GTValues.debugSmallOres = Gregtech.debug.debugSmallOres; + GTValues.debugStones = Gregtech.debug.debugStones; + GTValues.debugBlockMiner = Gregtech.debug.debugBlockMiner; + GTValues.debugBlockPump = Gregtech.debug.debugBlockPump; + GTValues.debugEntityCramming = Gregtech.debug.debugEntityCramming; + GTValues.debugWorldData = Gregtech.debug.debugWorldData; + GTValues.oreveinPercentage = Gregtech.general.oreveinPercentage; + GTValues.oreveinAttempts = Gregtech.general.oreveinAttempts; + GTValues.oreveinMaxPlacementAttempts = Gregtech.general.oreveinMaxPlacementAttempts; + GTValues.oreveinPlacerOres = Gregtech.general.oreveinPlacerOres; + GTValues.oreveinPlacerOresMultiplier = Gregtech.general.oreveinPlacerOresMultiplier; + GregTechAPI.TICKS_FOR_LAG_AVERAGING = Gregtech.general.ticksForLagAveraging; + GregTechAPI.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = Gregtech.general.millisecondThesholdUntilLagWarning; + GregTechAPI.sTimber = Gregtech.general.timber; + GregTechAPI.sDrinksAlwaysDrinkable = Gregtech.general.drinksAlwaysDrinkable; + GregTechAPI.sDoShowAllItemsInCreative = Gregtech.general.doShowAllItemsInCreative; + GregTechAPI.sMultiThreadedSounds = Gregtech.general.multiThreadedSounds; + GTMod.gregtechproxy.mMaxEqualEntitiesAtOneSpot = Gregtech.general.maxEqualEntitiesAtOneSpot; + GTMod.gregtechproxy.mFlintChance = Gregtech.general.flintChance; + GTMod.gregtechproxy.mItemDespawnTime = Gregtech.general.itemDespawnTime; + GTMod.gregtechproxy.mAllowSmallBoilerAutomation = Gregtech.general.allowSmallBoilerAutomation; + GTMod.gregtechproxy.mDisableVanillaOres = Worldgen.general.disableVanillaOres; + GTMod.gregtechproxy.mIncreaseDungeonLoot = Gregtech.general.increaseDungeonLoot; + GTMod.gregtechproxy.mAxeWhenAdventure = Gregtech.general.axeWhenAdventure; + GTMod.gregtechproxy.mSurvivalIntoAdventure = Gregtech.general.survivalIntoAdventure; + GTMod.gregtechproxy.mHungerEffect = Gregtech.general.hungerEffect; + GTMod.gregtechproxy.mInventoryUnification = Gregtech.general.inventoryUnification; + GTMod.gregtechproxy.mGTBees = Gregtech.general.GTBees; + GTMod.gregtechproxy.mCraftingUnification = Gregtech.general.craftingUnification; + GTMod.gregtechproxy.mNerfedWoodPlank = Gregtech.general.nerfedWoodPlank; + GTMod.gregtechproxy.mNerfedVanillaTools = Gregtech.general.nerfedVanillaTools; + GTMod.gregtechproxy.mAchievements = Gregtech.general.achievements; + GTMod.gregtechproxy.mHideUnusedOres = Gregtech.general.hideUnusedOres; + GTMod.gregtechproxy.mEnableAllMaterials = Gregtech.general.enableAllMaterials; + GTMod.gregtechproxy.mExplosionItemDrop = Gregtech.general.explosionItemDrop; + GTMod.gregtechproxy.mEnableCleanroom = Gregtech.general.enableCleanroom; + GTMod.gregtechproxy.mLowGravProcessing = GalacticraftCore.isModLoaded() && Gregtech.general.lowGravProcessing; + GTMod.gregtechproxy.mCropNeedBlock = Gregtech.general.cropNeedBlock; + GTMod.gregtechproxy.mAMHInteraction = Gregtech.general.autoMaintenaceHatchesInteraction; + GTMod.gregtechproxy.mMixedOreOnlyYieldsTwoThirdsOfPureOre = Gregtech.general.mixedOreOnlyYieldsTwoThirdsOfPureOre; + GTMod.gregtechproxy.mRichOreYieldMultiplier = Gregtech.general.richOreYieldMultiplier; + GTMod.gregtechproxy.mNetherOreYieldMultiplier = Gregtech.general.netherOreYieldMultiplier; + GTMod.gregtechproxy.mEndOreYieldMultiplier = Gregtech.general.endOreYieldMultiplier; + GTMod.gregtechproxy.gt6Pipe = Gregtech.general.gt6Pipe; + GTMod.gregtechproxy.gt6Cable = Gregtech.general.gt6Cable; + GTMod.gregtechproxy.ic2EnergySourceCompat = Gregtech.general.ic2EnergySourceCompat; + GTMod.gregtechproxy.costlyCableConnection = Gregtech.general.costlyCableConnection; + GTMod.gregtechproxy.crashOnNullRecipeInput = Gregtech.general.crashOnNullRecipeInput; if ((boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")) { GTMod.gregtechproxy.crashOnNullRecipeInput = false; // Use flags in GTRecipeBuilder instead! } - GTLanguageManager.i18nPlaceholder = ConfigGeneral.i18nPlaceholder; - MTELongDistancePipelineBase.minimalDistancePoints = ConfigGeneral.minimalDistancePoints; - GTValues.mCTMEnabledBlock.addAll(Arrays.asList(ConfigGeneral.CTMWhitelist)); - GTValues.mCTMDisabledBlock.addAll(Arrays.asList(ConfigGeneral.CTMBlacklist)); - if (ConfigGeneral.harderMobSpawner) { + GTLanguageManager.i18nPlaceholder = Gregtech.general.i18nPlaceholder; + MTELongDistancePipelineBase.minimalDistancePoints = Gregtech.general.minimalDistancePoints; + GTValues.mCTMEnabledBlock.addAll(Arrays.asList(Gregtech.general.CTMWhitelist)); + GTValues.mCTMDisabledBlock.addAll(Arrays.asList(Gregtech.general.CTMBlacklist)); + if (Gregtech.general.harderMobSpawner) { Blocks.mob_spawner.setHardness(500.0F) .setResistance(6000000.0F); } // machines - GTValues.ticksBetweenSounds = ConfigMachines.ticksBetweenSounds; - GTValues.blacklistedTileEntiyClassNamesForWA = ConfigMachines.blacklistedTileEntiyClassNamesForWA; - GTValues.cleanroomGlass = ConfigMachines.cleanroomGlass; - GTValues.enableChunkloaders = ConfigMachines.enableChunkloaders; - GTValues.alwaysReloadChunkloaders = ConfigMachines.alwaysReloadChunkloaders; - GTValues.debugChunkloaders = ConfigDebug.debugChunkloaders; - GTValues.disableDigitalChestsExternalAccess = ConfigMachines.disableDigitalChestsExternalAccess; - GTValues.enableMultiTileEntities = ConfigMachines.enableMultiTileEntities + GTValues.ticksBetweenSounds = Gregtech.machines.ticksBetweenSounds; + GTValues.blacklistedTileEntiyClassNamesForWA = Gregtech.machines.blacklistedTileEntiyClassNamesForWA; + GTValues.cleanroomGlass = Gregtech.machines.cleanroomGlass; + GTValues.enableChunkloaders = Gregtech.machines.enableChunkloaders; + GTValues.alwaysReloadChunkloaders = Gregtech.machines.alwaysReloadChunkloaders; + GTValues.debugChunkloaders = Gregtech.debug.debugChunkloaders; + GTValues.disableDigitalChestsExternalAccess = Gregtech.machines.disableDigitalChestsExternalAccess; + GTValues.enableMultiTileEntities = Gregtech.machines.enableMultiTileEntities || (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); - GregTechAPI.sMachineExplosions = ConfigMachines.machineExplosions; - GregTechAPI.sMachineFlammable = ConfigMachines.machineFlammable; - GregTechAPI.sMachineNonWrenchExplosions = ConfigMachines.machineNonWrenchExplosions; - GregTechAPI.sMachineWireFire = ConfigMachines.machineWireFire; - GregTechAPI.sMachineFireExplosions = ConfigMachines.machineFireExplosions; - GregTechAPI.sMachineRainExplosions = ConfigMachines.machineRainExplosions; - GregTechAPI.sMachineThunderExplosions = ConfigMachines.machineThunderExplosions; - GregTechAPI.sColoredGUI = ConfigMachines.coloredGUI; - GregTechAPI.sMachineMetalGUI = ConfigMachines.machineMetalGUI; + GregTechAPI.sMachineExplosions = Gregtech.machines.machineExplosions; + GregTechAPI.sMachineFlammable = Gregtech.machines.machineFlammable; + GregTechAPI.sMachineNonWrenchExplosions = Gregtech.machines.machineNonWrenchExplosions; + GregTechAPI.sMachineWireFire = Gregtech.machines.machineWireFire; + GregTechAPI.sMachineFireExplosions = Gregtech.machines.machineFireExplosions; + GregTechAPI.sMachineRainExplosions = Gregtech.machines.machineRainExplosions; + GregTechAPI.sMachineThunderExplosions = Gregtech.machines.machineThunderExplosions; + GregTechAPI.sColoredGUI = Gregtech.machines.coloredGUI; + GregTechAPI.sMachineMetalGUI = Gregtech.machines.machineMetalGUI; // Implementation for this is actually handled in NewHorizonsCoreMod in MainRegistry.java! - GregTechAPI.sUseMachineMetal = ConfigMachines.useMachineMetal; + GregTechAPI.sUseMachineMetal = Gregtech.machines.useMachineMetal; // client loadClientConfig(); // Pollution - GTMod.gregtechproxy.mPollution = ConfigPollution.pollution; - GTMod.gregtechproxy.mPollutionSmogLimit = ConfigPollution.pollutionSmogLimit; - GTMod.gregtechproxy.mPollutionPoisonLimit = ConfigPollution.pollutionPoisonLimit; - GTMod.gregtechproxy.mPollutionVegetationLimit = ConfigPollution.pollutionVegetationLimit; - GTMod.gregtechproxy.mPollutionSourRainLimit = ConfigPollution.pollutionSourRainLimit; - GTMod.gregtechproxy.mPollutionOnExplosion = ConfigPollution.pollutionOnExplosion; - GTMod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond = ConfigPollution.pollutionPrimitveBlastFurnacePerSecond; - GTMod.gregtechproxy.mPollutionCharcoalPitPerSecond = ConfigPollution.pollutionCharcoalPitPerSecond; - GTMod.gregtechproxy.mPollutionEBFPerSecond = ConfigPollution.pollutionEBFPerSecond; - GTMod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond = ConfigPollution.pollutionLargeCombustionEnginePerSecond; - GTMod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond = ConfigPollution.pollutionExtremeCombustionEnginePerSecond; - GTMod.gregtechproxy.mPollutionImplosionCompressorPerSecond = ConfigPollution.pollutionImplosionCompressorPerSecond; - GTMod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond = ConfigPollution.pollutionLargeBronzeBoilerPerSecond; - GTMod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond = ConfigPollution.pollutionLargeSteelBoilerPerSecond; - GTMod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond = ConfigPollution.pollutionLargeTitaniumBoilerPerSecond; - GTMod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond = ConfigPollution.pollutionLargeTungstenSteelBoilerPerSecond; - GTMod.gregtechproxy.mPollutionReleasedByThrottle = ConfigPollution.pollutionReleasedByThrottle; - GTMod.gregtechproxy.mPollutionLargeGasTurbinePerSecond = ConfigPollution.pollutionLargeGasTurbinePerSecond; - GTMod.gregtechproxy.mPollutionMultiSmelterPerSecond = ConfigPollution.pollutionMultiSmelterPerSecond; - GTMod.gregtechproxy.mPollutionPyrolyseOvenPerSecond = ConfigPollution.pollutionPyrolyseOvenPerSecond; - GTMod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond = ConfigPollution.pollutionSmallCoalBoilerPerSecond; - GTMod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond = ConfigPollution.pollutionHighPressureLavaBoilerPerSecond; - GTMod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond = ConfigPollution.pollutionHighPressureCoalBoilerPerSecond; - GTMod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond = ConfigPollution.pollutionBaseDieselGeneratorPerSecond; - double[] mPollutionDieselGeneratorReleasedByTier = ConfigPollution.pollutionDieselGeneratorReleasedByTier; + GTMod.gregtechproxy.mPollution = Gregtech.pollution.pollution; + GTMod.gregtechproxy.mPollutionSmogLimit = Gregtech.pollution.pollutionSmogLimit; + GTMod.gregtechproxy.mPollutionPoisonLimit = Gregtech.pollution.pollutionPoisonLimit; + GTMod.gregtechproxy.mPollutionVegetationLimit = Gregtech.pollution.pollutionVegetationLimit; + GTMod.gregtechproxy.mPollutionSourRainLimit = Gregtech.pollution.pollutionSourRainLimit; + GTMod.gregtechproxy.mPollutionOnExplosion = Gregtech.pollution.pollutionOnExplosion; + GTMod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond = Gregtech.pollution.pollutionPrimitveBlastFurnacePerSecond; + GTMod.gregtechproxy.mPollutionCharcoalPitPerSecond = Gregtech.pollution.pollutionCharcoalPitPerSecond; + GTMod.gregtechproxy.mPollutionEBFPerSecond = Gregtech.pollution.pollutionEBFPerSecond; + GTMod.gregtechproxy.mPollutionLargeCombustionEnginePerSecond = Gregtech.pollution.pollutionLargeCombustionEnginePerSecond; + GTMod.gregtechproxy.mPollutionExtremeCombustionEnginePerSecond = Gregtech.pollution.pollutionExtremeCombustionEnginePerSecond; + GTMod.gregtechproxy.mPollutionImplosionCompressorPerSecond = Gregtech.pollution.pollutionImplosionCompressorPerSecond; + GTMod.gregtechproxy.mPollutionLargeBronzeBoilerPerSecond = Gregtech.pollution.pollutionLargeBronzeBoilerPerSecond; + GTMod.gregtechproxy.mPollutionLargeSteelBoilerPerSecond = Gregtech.pollution.pollutionLargeSteelBoilerPerSecond; + GTMod.gregtechproxy.mPollutionLargeTitaniumBoilerPerSecond = Gregtech.pollution.pollutionLargeTitaniumBoilerPerSecond; + GTMod.gregtechproxy.mPollutionLargeTungstenSteelBoilerPerSecond = Gregtech.pollution.pollutionLargeTungstenSteelBoilerPerSecond; + GTMod.gregtechproxy.mPollutionReleasedByThrottle = Gregtech.pollution.pollutionReleasedByThrottle; + GTMod.gregtechproxy.mPollutionLargeGasTurbinePerSecond = Gregtech.pollution.pollutionLargeGasTurbinePerSecond; + GTMod.gregtechproxy.mPollutionMultiSmelterPerSecond = Gregtech.pollution.pollutionMultiSmelterPerSecond; + GTMod.gregtechproxy.mPollutionPyrolyseOvenPerSecond = Gregtech.pollution.pollutionPyrolyseOvenPerSecond; + GTMod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond = Gregtech.pollution.pollutionSmallCoalBoilerPerSecond; + GTMod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond = Gregtech.pollution.pollutionHighPressureLavaBoilerPerSecond; + GTMod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond = Gregtech.pollution.pollutionHighPressureCoalBoilerPerSecond; + GTMod.gregtechproxy.mPollutionBaseDieselGeneratorPerSecond = Gregtech.pollution.pollutionBaseDieselGeneratorPerSecond; + double[] mPollutionDieselGeneratorReleasedByTier = Gregtech.pollution.pollutionDieselGeneratorReleasedByTier; if (mPollutionDieselGeneratorReleasedByTier.length == GTMod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier.length) { GTMod.gregtechproxy.mPollutionDieselGeneratorReleasedByTier = mPollutionDieselGeneratorReleasedByTier; @@ -497,8 +481,8 @@ public class GTPreLoad { GT_FML_LOGGER .error("The Length of the Diesel Turbine Pollution Array Config must be the same as the Default"); } - GTMod.gregtechproxy.mPollutionBaseGasTurbinePerSecond = ConfigPollution.pollutionBaseGasTurbinePerSecond; - double[] mPollutionGasTurbineReleasedByTier = ConfigPollution.pollutionGasTurbineReleasedByTier; + GTMod.gregtechproxy.mPollutionBaseGasTurbinePerSecond = Gregtech.pollution.pollutionBaseGasTurbinePerSecond; + double[] mPollutionGasTurbineReleasedByTier = Gregtech.pollution.pollutionGasTurbineReleasedByTier; if (mPollutionGasTurbineReleasedByTier.length == GTMod.gregtechproxy.mPollutionGasTurbineReleasedByTier.length) { GTMod.gregtechproxy.mPollutionGasTurbineReleasedByTier = mPollutionGasTurbineReleasedByTier; @@ -513,56 +497,54 @@ public class GTPreLoad { GTMod.gregtechproxy.mUndergroundOil.getConfig(GTConfig.undergroundFluidsFile, "undergroundfluid"); // Worldgeneration.cfg - GTMod.gregtechproxy.enableUndergroundGravelGen = gregtech.common.config.worldgen.ConfigGeneral.generateUndergroundGravelGen; - GTMod.gregtechproxy.enableUndergroundDirtGen = gregtech.common.config.worldgen.ConfigGeneral.generateUndergroundDirtGen; - GTMod.gregtechproxy.enableBlackGraniteOres = gregtech.common.config.worldgen.ConfigGeneral.generateBlackGraniteOres; - GTMod.gregtechproxy.enableRedGraniteOres = gregtech.common.config.worldgen.ConfigGeneral.generateBlackGraniteOres; - GTMod.gregtechproxy.enableMarbleOres = gregtech.common.config.worldgen.ConfigGeneral.generateMarbleOres; - GTMod.gregtechproxy.enableBasaltOres = gregtech.common.config.worldgen.ConfigGeneral.generateBasaltOres; + GTMod.gregtechproxy.enableUndergroundGravelGen = Worldgen.general.generateUndergroundGravelGen; + GTMod.gregtechproxy.enableUndergroundDirtGen = Worldgen.general.generateUndergroundDirtGen; + GTMod.gregtechproxy.enableBlackGraniteOres = Worldgen.general.generateBlackGraniteOres; + GTMod.gregtechproxy.enableRedGraniteOres = Worldgen.general.generateRedGraniteOres; + GTMod.gregtechproxy.enableMarbleOres = Worldgen.general.generateMarbleOres; + GTMod.gregtechproxy.enableBasaltOres = Worldgen.general.generateBasaltOres; // OverpoweredStuff.cfg - GregTechAPI.mOutputRF = gregtech.common.config.opstuff.ConfigGeneral.outputRF; - GregTechAPI.mInputRF = gregtech.common.config.opstuff.ConfigGeneral.inputRF; - GregTechAPI.mEUtoRF = gregtech.common.config.opstuff.ConfigGeneral.howMuchRFWith100EUInInput; - GregTechAPI.mRFtoEU = gregtech.common.config.opstuff.ConfigGeneral.howMuchEUWith100RFInInput; - GregTechAPI.mRFExplosions = gregtech.common.config.opstuff.ConfigGeneral.RFExplosions; + GregTechAPI.mOutputRF = OPStuff.outputRF; + GregTechAPI.mInputRF = OPStuff.inputRF; + GregTechAPI.mEUtoRF = OPStuff.howMuchRFWith100EUInInput; + GregTechAPI.mRFtoEU = OPStuff.howMuchEUWith100RFInInput; + GregTechAPI.mRFExplosions = OPStuff.RFExplosions; // MachineStats.cfg - GTMod.gregtechproxy.mForceFreeFace = gregtech.common.config.machinestats.ConfigMachines.forceFreeFace; + GTMod.gregtechproxy.mForceFreeFace = MachineStats.machines.forceFreeFace; // ore_drop_behavior - try { - GTLog.out.println("Trying to set it to: " + ConfigOreDropBehavior.setting); - GTMod.gregtechproxy.oreDropSystem = GTProxy.OreDropSystem.valueOf(ConfigOreDropBehavior.setting); - } catch (IllegalArgumentException e) { - GTLog.err.println(e); - GTMod.gregtechproxy.oreDropSystem = GTProxy.OreDropSystem.FortuneItem; - } + GTMod.gregtechproxy.oreDropSystem = Gregtech.oreDropBehavior.setting; // features - GTMod.gregtechproxy.mUpgradeCount = Math.min(64, Math.max(1, ConfigFeatures.upgradeStackSize)); + GTMod.gregtechproxy.mUpgradeCount = Math.min(64, Math.max(1, Gregtech.features.upgradeStackSize)); for (OrePrefixes tPrefix : OrePrefixes.values()) { if (tPrefix.mIsUsedForOreProcessing) { - tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(1, ConfigFeatures.maxOreStackSize))); + tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(1, Gregtech.features.maxOreStackSize))); } else if (tPrefix == OrePrefixes.plank) { - tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(16, ConfigFeatures.maxPlankStackSize))); + tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(16, Gregtech.features.maxPlankStackSize))); } else if ((tPrefix == OrePrefixes.wood) || (tPrefix == OrePrefixes.treeLeaves) || (tPrefix == OrePrefixes.treeSapling) || (tPrefix == OrePrefixes.log)) { - tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(16, ConfigFeatures.maxLogStackSize))); + tPrefix.mDefaultStackSize = ((byte) Math.min(64, Math.max(16, Gregtech.features.maxLogStackSize))); } else if (tPrefix.mIsUsedForBlocks) { tPrefix.mDefaultStackSize = ((byte) Math - .min(64, Math.max(16, ConfigFeatures.maxOtherBlocksStackSize))); + .min(64, Math.max(16, Gregtech.features.maxOtherBlocksStackSize))); } } GTRecipeBuilder.onConfigLoad(); } - public static void parseHex(Dyes dye, String hexString) { - dye.mRGBa[0] = Short.parseShort(hexString.substring(1, 3), 16); - dye.mRGBa[1] = Short.parseShort(hexString.substring(3, 5), 16); - dye.mRGBa[2] = Short.parseShort(hexString.substring(5), 16); + /** + * Clamp value between 0 and 255 + * + * @param value the value to clamp + * @return the clamped value + */ + private static int sanitizeConfigInt(int value) { + return Math.min(255, Math.max(0, value)); } public static void loadClientConfig() { @@ -571,9 +553,21 @@ public class GTPreLoad { .forEach(dye -> { switch (dye.toString() .toLowerCase()) { - case "cable_insulation" -> parseHex(dye, ConfigColorModulation.cableInsulation); - case "construction_foam" -> parseHex(dye, ConfigColorModulation.constructionFoam); - case "machine_metal" -> parseHex(dye, ConfigColorModulation.machineMetal); + case "cable_insulation" -> { + dye.mRGBa[0] = (short) sanitizeConfigInt(Client.colorModulation.cableInsulation.red); + dye.mRGBa[1] = (short) sanitizeConfigInt(Client.colorModulation.cableInsulation.green); + dye.mRGBa[2] = (short) sanitizeConfigInt(Client.colorModulation.cableInsulation.blue); + } + case "construction_foam" -> { + dye.mRGBa[0] = (short) sanitizeConfigInt(Client.colorModulation.constructionFoam.red); + dye.mRGBa[1] = (short) sanitizeConfigInt(Client.colorModulation.constructionFoam.green); + dye.mRGBa[2] = (short) sanitizeConfigInt(Client.colorModulation.constructionFoam.blue); + } + case "machine_metal" -> { + dye.mRGBa[0] = (short) sanitizeConfigInt(Client.colorModulation.machineMetal.red); + dye.mRGBa[1] = (short) sanitizeConfigInt(Client.colorModulation.machineMetal.green); + dye.mRGBa[2] = (short) sanitizeConfigInt(Client.colorModulation.machineMetal.blue); + } default -> { GT_FML_LOGGER.warn( "unknown color modulation entry: " + dye @@ -581,74 +575,30 @@ public class GTPreLoad { } } }); - GTMod.gregtechproxy.mRenderTileAmbientOcclusion = ConfigRender.renderTileAmbientOcclusion; - GTMod.gregtechproxy.mRenderGlowTextures = ConfigRender.renderGlowTextures; - GTMod.gregtechproxy.mRenderFlippedMachinesFlipped = ConfigRender.renderFlippedMachinesFlipped; - GTMod.gregtechproxy.mRenderIndicatorsOnHatch = ConfigRender.renderIndicatorsOnHatch; - GTMod.gregtechproxy.mRenderDirtParticles = ConfigRender.renderDirtParticles; - GTMod.gregtechproxy.mRenderPollutionFog = ConfigRender.renderPollutionFog; - GTMod.gregtechproxy.mRenderItemDurabilityBar = ConfigRender.renderItemDurabilityBar; - GTMod.gregtechproxy.mRenderItemChargeBar = ConfigRender.renderItemChargeBar; - GTMod.gregtechproxy.mUseBlockUpdateHandler = ConfigRender.useBlockUpdateHandler; - - GTMod.gregtechproxy.mCoverTabsVisible = ConfigInterface.coverTabsVisible; - GTMod.gregtechproxy.mCoverTabsFlipped = ConfigInterface.coverTabsFlipped; - GTMod.gregtechproxy.mTooltipVerbosity = ConfigInterface.tooltipVerbosity; - GTMod.gregtechproxy.mTooltipShiftVerbosity = ConfigInterface.tooltipShiftVerbosity; - GTMod.gregtechproxy.mTitleTabStyle = ConfigInterface.titleTabStyle; - - GTMod.gregtechproxy.mNEIRecipeSecondMode = GregTechAPI.NEIClientFIle.get("nei", "RecipeSecondMode", true); - GTMod.gregtechproxy.mNEIRecipeOwner = GregTechAPI.NEIClientFIle.get("nei", "RecipeOwner", false); - GTMod.gregtechproxy.mNEIRecipeOwnerStackTrace = GregTechAPI.NEIClientFIle - .get("nei", "RecipeOwnerStackTrace", false); - GTMod.gregtechproxy.mNEIOriginalVoltage = GregTechAPI.NEIClientFIle.get("nei", "OriginalVoltage", false); - - GTMod.gregtechproxy.recipeCategorySettings.clear(); - for (RecipeCategory recipeCategory : findRecipeCategories()) { - RecipeCategorySetting setting = RecipeCategorySetting.find( - GregTechAPI.NEIClientFIle.getWithValidValues( - "nei.recipe_categories", - recipeCategory.unlocalizedName, - RecipeCategorySetting.NAMES, - RecipeCategorySetting.getDefault() - .toName())); - GTMod.gregtechproxy.recipeCategorySettings.put(recipeCategory, setting); - } - - GTMod.gregtechproxy.mWailaTransformerVoltageTier = ConfigWaila.wailaTransformerVoltageTier; - GTMod.gregtechproxy.wailaAverageNS = ConfigWaila.wailaAverageNS; + GTMod.gregtechproxy.mRenderTileAmbientOcclusion = Client.render.renderTileAmbientOcclusion; + GTMod.gregtechproxy.mRenderGlowTextures = Client.render.renderGlowTextures; + GTMod.gregtechproxy.mRenderFlippedMachinesFlipped = Client.render.renderFlippedMachinesFlipped; + GTMod.gregtechproxy.mRenderIndicatorsOnHatch = Client.render.renderIndicatorsOnHatch; + GTMod.gregtechproxy.mRenderDirtParticles = Client.render.renderDirtParticles; + GTMod.gregtechproxy.mRenderPollutionFog = Client.render.renderPollutionFog; + GTMod.gregtechproxy.mRenderItemDurabilityBar = Client.render.renderItemDurabilityBar; + GTMod.gregtechproxy.mRenderItemChargeBar = Client.render.renderItemChargeBar; + GTMod.gregtechproxy.mUseBlockUpdateHandler = Client.render.useBlockUpdateHandler; + + GTMod.gregtechproxy.mCoverTabsVisible = Client.iface.coverTabsVisible; + GTMod.gregtechproxy.mCoverTabsFlipped = Client.iface.coverTabsFlipped; + GTMod.gregtechproxy.mTooltipVerbosity = Client.iface.tooltipVerbosity; + GTMod.gregtechproxy.mTooltipShiftVerbosity = Client.iface.tooltipShiftVerbosity; + GTMod.gregtechproxy.mTitleTabStyle = Client.iface.titleTabStyle; + + GTMod.gregtechproxy.mNEIRecipeSecondMode = Client.nei.NEIRecipeSecondMode; + GTMod.gregtechproxy.mNEIRecipeOwner = Client.nei.NEIRecipeOwner; + GTMod.gregtechproxy.mNEIRecipeOwnerStackTrace = Client.nei.NEIRecipeOwnerStackTrace; + GTMod.gregtechproxy.mNEIOriginalVoltage = Client.nei.NEIOriginalVoltage; + + GTMod.gregtechproxy.mWailaTransformerVoltageTier = Client.waila.wailaTransformerVoltageTier; + GTMod.gregtechproxy.wailaAverageNS = Client.waila.wailaAverageNS; GTMod.gregtechproxy.reloadNEICache(); } - - private static List<RecipeCategory> findRecipeCategories() { - List<RecipeCategory> ret = new ArrayList<>(); - try { - Field discovererField = Loader.class.getDeclaredField("discoverer"); - discovererField.setAccessible(true); - ModDiscoverer discoverer = (ModDiscoverer) discovererField.get(Loader.instance()); - for (ASMDataTable.ASMData asmData : discoverer.getASMTable() - .getAll(RecipeCategoryHolder.class.getName())) { - try { - Object obj = Class.forName(asmData.getClassName()) - .getDeclaredField(asmData.getObjectName()) - .get(null); - if (obj instanceof RecipeCategory recipeCategory) { - ret.add(recipeCategory); - } else { - GT_FML_LOGGER.error( - "{}#{} is not an instance of RecipeCategory", - asmData.getClassName(), - asmData.getObjectName()); - } - } catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) { - GT_FML_LOGGER.error("Failed to find RecipeCategory"); - GT_FML_LOGGER.catching(e); - } - } - } catch (NoSuchFieldException | IllegalAccessException e) { - throw new RuntimeException(e); - } - return ret; - } } diff --git a/src/main/java/gregtech/nei/GTNEIDefaultHandler.java b/src/main/java/gregtech/nei/GTNEIDefaultHandler.java index 3887ad321b..c3be2cd9f4 100644 --- a/src/main/java/gregtech/nei/GTNEIDefaultHandler.java +++ b/src/main/java/gregtech/nei/GTNEIDefaultHandler.java @@ -164,12 +164,10 @@ public class GTNEIDefaultHandler extends TemplateRecipeHandler { .entrySet() .stream() .flatMap(entry -> { - boolean merge = entry.getKey() != defaultCategory - && GTMod.gregtechproxy.recipeCategorySettings - .getOrDefault(entry.getKey(), RecipeCategorySetting.getDefault()) - == RecipeCategorySetting.MERGE; - return merge ? entry.getValue() - .stream() : Stream.empty(); + RecipeCategory recipeCategory = entry.getKey(); + Collection<GTRecipe> correspondingRecipes = entry.getValue(); + boolean merge = recipeCategory.settingSupplier.get() == RecipeCategorySetting.MERGE; + return merge ? correspondingRecipes.stream() : Stream.empty(); }); recipes = Stream.concat( recipesToMerge, @@ -179,9 +177,7 @@ public class GTNEIDefaultHandler extends TemplateRecipeHandler { .collect(Collectors.toList()); } else { // This is "sub" category - if (GTMod.gregtechproxy.recipeCategorySettings - .getOrDefault(recipeCategory, RecipeCategorySetting.getDefault()) - == RecipeCategorySetting.ENABLE) { + if (recipeCategory.settingSupplier.get() == RecipeCategorySetting.ENABLE) { recipes = recipeMap.getBackend() .getRecipesByCategory(recipeCategory); } else { diff --git a/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeCategories.java b/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeCategories.java deleted file mode 100644 index 310f6f540d..0000000000 --- a/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeCategories.java +++ /dev/null @@ -1,17 +0,0 @@ -package gtPlusPlus.api.recipe; - -import static gregtech.api.recipe.RecipeCategory.createIcon; - -import gregtech.api.enums.Mods; -import gregtech.api.recipe.RecipeCategory; -import gregtech.api.recipe.RecipeCategoryHolder; - -public class GTPPRecipeCategories { - - @RecipeCategoryHolder - public static final RecipeCategory absNonAlloyRecipes = new RecipeCategory( - "gtpp.recipe.category.abs_non_alloy_recipes", - GTPPRecipeMaps.alloyBlastSmelterRecipes, - builder -> builder.setDisplayImage( - createIcon(Mods.GTPlusPlus.getResourcePath("textures", "gui", "picture", "abs_non_alloy_recipes.png")))); -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEMassFabricator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEMassFabricator.java index 0bcf503daf..22de5388f9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEMassFabricator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEMassFabricator.java @@ -54,7 +54,7 @@ import gregtech.api.util.GTModHandler; import gregtech.api.util.GTRecipe; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; -import gregtech.common.config.machinestats.ConfigMassFabricator; +import gregtech.common.config.MachineStats; import gtPlusPlus.api.recipe.GTPPRecipeMaps; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.GTPPCore; @@ -145,10 +145,10 @@ public class MTEMassFabricator extends GTPPMultiBlockBase<MTEMassFabricator> imp @Override public void onConfigLoad() { super.onConfigLoad(); - sDurationMultiplier = ConfigMassFabricator.durationMultiplier; - sUUAperUUM = ConfigMassFabricator.UUAPerUUM; - sUUASpeedBonus = ConfigMassFabricator.UUASpeedBonus; - sRequiresUUA = ConfigMassFabricator.requiresUUA; + sDurationMultiplier = MachineStats.massFabricator.durationMultiplier; + sUUAperUUM = MachineStats.massFabricator.UUAPerUUM; + sUUASpeedBonus = MachineStats.massFabricator.UUASpeedBonus; + sRequiresUUA = MachineStats.massFabricator.requiresUUA; } public static boolean sInit = false; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenBlastSmelter.java index d90e842394..a0104cd809 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenBlastSmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenBlastSmelter.java @@ -16,11 +16,11 @@ import net.minecraftforge.fluids.FluidStack; import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; +import gregtech.api.recipe.RecipeCategories; import gregtech.api.util.GTRecipeBuilder; import gregtech.api.util.GTUtility; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.recipe.GTPPRecipeCategories; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; import gtPlusPlus.core.material.MaterialStack; @@ -136,7 +136,7 @@ public class RecipeGenBlastSmelter extends RecipeGenBase { .fluidOutputs(M.getFluidStack(fluidAmount)) .duration(duration / (mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)) .eut(aVoltage) - .recipeCategory(GTPPRecipeCategories.absNonAlloyRecipes) + .recipeCategory(RecipeCategories.absNonAlloyRecipes) .addTo(alloyBlastSmelterRecipes); } else { Logger.WARNING("[BAS] Failed."); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenBlastSmelterGTNH.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenBlastSmelterGTNH.java index 84a9290d87..a78b517268 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenBlastSmelterGTNH.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenBlastSmelterGTNH.java @@ -11,12 +11,12 @@ import net.minecraftforge.oredict.OreDictionary; import org.apache.commons.lang3.ArrayUtils; import gregtech.api.enums.GTValues; +import gregtech.api.recipe.RecipeCategories; import gregtech.api.recipe.RecipeMaps; import gregtech.api.util.GTRecipe; import gregtech.api.util.GTUtility; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.minecraft.ItemStackData; -import gtPlusPlus.api.recipe.GTPPRecipeCategories; import gtPlusPlus.api.recipe.GTPPRecipeMaps; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.FluidUtils; @@ -215,7 +215,7 @@ public class RecipeGenBlastSmelterGTNH { .duration(MathUtils.roundToClosestInt(time * 0.8)) .eut(voltage) .recipeCategory( - inputLength <= 2 ? GTPPRecipeCategories.absNonAlloyRecipes + inputLength <= 2 ? RecipeCategories.absNonAlloyRecipes : GTPPRecipeMaps.alloyBlastSmelterRecipes.getDefaultRecipeCategory()) .addTo(GTPPRecipeMaps.alloyBlastSmelterRecipes); } else { |