From 8156e292e1f96b79a6fa75993e6d60202c472d9c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:49:01 +0200 Subject: [PATCH] Spotless apply for branch config/tectech for #3207 (#3208) Co-authored-by: GitHub GTNH Actions <> --- src/main/java/tectech/TecTech.java | 10 ++---- .../java/tectech/loader/ConfigHandler.java | 14 +++++--- src/main/java/tectech/loader/MainLoader.java | 1 - .../java/tectech/loader/TecTechConfig.java | 5 +-- .../loader/gui/TecTechGUIClientConfig.java | 15 ++++----- .../tectech/loader/gui/TecTechGUIFactory.java | 3 +- .../hatch/MTEHatchCapacitor.java | 1 - .../metaTileEntity/hatch/MTEHatchRack.java | 1 - .../multi/MTEEnergyInfuser.java | 1 - .../metaTileEntity/multi/MTEForgeOfGods.java | 1 - .../metaTileEntity/multi/MTETeslaTower.java | 33 ++++++++++--------- .../multi/base/TTMultiblockBase.java | 1 - .../godforge_modules/MTEPlasmaModule.java | 1 - .../metaTileEntity/single/MTETeslaCoil.java | 6 ++-- 14 files changed, 43 insertions(+), 50 deletions(-) diff --git a/src/main/java/tectech/TecTech.java b/src/main/java/tectech/TecTech.java index 6bfa67d8310..d5b4fb501b8 100644 --- a/src/main/java/tectech/TecTech.java +++ b/src/main/java/tectech/TecTech.java @@ -1,14 +1,9 @@ package tectech; +import net.minecraftforge.common.MinecraftForge; + import com.gtnewhorizon.gtnhlib.config.ConfigException; import com.gtnewhorizon.gtnhlib.config.ConfigurationManager; -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 net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; @@ -47,6 +42,7 @@ + "after:CoFHCore;" + "after:Thaumcraft;") public class TecTech { + static { try { ConfigurationManager.registerConfig(ConfigHandler.class); diff --git a/src/main/java/tectech/loader/ConfigHandler.java b/src/main/java/tectech/loader/ConfigHandler.java index 1b4d4927577..ead868031d6 100644 --- a/src/main/java/tectech/loader/ConfigHandler.java +++ b/src/main/java/tectech/loader/ConfigHandler.java @@ -1,18 +1,21 @@ package tectech.loader; import com.gtnewhorizon.gtnhlib.config.Config; + import gregtech.api.enums.Mods; @Config(modid = Mods.Names.TECTECH, filename = "tectech") @Config.LangKeyPattern(pattern = "GT5U.gui.config.%cat.%field", fullyQualified = true) @Config.RequiresMcRestart public class ConfigHandler { + public static Debug debug = new Debug(); public static Features features = new Features(); public static Modules modules = new Modules(); public static TeslaTweaks teslaTweaks = new TeslaTweaks(); - public static class Debug{ + public static class Debug { + @Config.Comment("Enables logging and other purely debug features") @Config.DefaultBoolean(false) public boolean DEBUG_MODE; @@ -21,7 +24,8 @@ public static class Debug{ public boolean POWERLESS_MODE = false; } - public static class Features{ + public static class Features { + @Config.Comment("Set to false to disable explosions on everything bad that you can do") @Config.DefaultBoolean(true) public boolean BOOM_ENABLE; @@ -33,13 +37,15 @@ public static class Features{ public boolean NERF_FUSION; } - public static class Modules{ + public static class Modules { + @Config.Comment("If set to true, every op/admin will receive all errors occurred during the startup phase as in game message on join") @Config.DefaultBoolean(false) public boolean MOD_ADMIN_ERROR_LOGS; } - public static class TeslaTweaks{ + public static class TeslaTweaks { + @Config.Comment("Set to true to enable outputting plasmas as gasses from the tesla tower with a 1:1 ratio") @Config.DefaultBoolean(false) public boolean TESLA_MULTI_GAS_OUTPUT; diff --git a/src/main/java/tectech/loader/MainLoader.java b/src/main/java/tectech/loader/MainLoader.java index 9c6427f3c1f..b5ef99e3edb 100644 --- a/src/main/java/tectech/loader/MainLoader.java +++ b/src/main/java/tectech/loader/MainLoader.java @@ -3,7 +3,6 @@ import static gregtech.api.enums.Mods.NewHorizonsCoreMod; import static gregtech.api.enums.Mods.TwilightForest; import static tectech.TecTech.LOGGER; -import static tectech.TecTech.configTecTech; import static tectech.TecTech.creativeTabTecTech; import static tectech.TecTech.proxy; diff --git a/src/main/java/tectech/loader/TecTechConfig.java b/src/main/java/tectech/loader/TecTechConfig.java index 8b1af5a6748..0e52ee2eb3e 100644 --- a/src/main/java/tectech/loader/TecTechConfig.java +++ b/src/main/java/tectech/loader/TecTechConfig.java @@ -10,22 +10,19 @@ public TecTechConfig(File pConfigBaseDirectory, String pModCollectionDirectory, super(pConfigBaseDirectory, pModCollectionDirectory, pModID); } - /** * This loading phases do not correspond to mod loading phases! */ @Override protected void PreInit() { - } /** * This loading phases do not correspond to mod loading phases! */ @Override - protected void Init() { - } + protected void Init() {} /** * This loading phases do not correspond to mod loading phases! diff --git a/src/main/java/tectech/loader/gui/TecTechGUIClientConfig.java b/src/main/java/tectech/loader/gui/TecTechGUIClientConfig.java index 263f341bcac..0399c13a59d 100644 --- a/src/main/java/tectech/loader/gui/TecTechGUIClientConfig.java +++ b/src/main/java/tectech/loader/gui/TecTechGUIClientConfig.java @@ -1,20 +1,17 @@ package tectech.loader.gui; +import static gregtech.api.enums.Mods.TecTech; + +import net.minecraft.client.gui.GuiScreen; + import com.gtnewhorizon.gtnhlib.config.ConfigException; import com.gtnewhorizon.gtnhlib.config.SimpleGuiConfig; -import net.minecraft.client.gui.GuiScreen; -import tectech.loader.ConfigHandler; -import static gregtech.api.enums.Mods.TecTech; +import tectech.loader.ConfigHandler; public class TecTechGUIClientConfig extends SimpleGuiConfig { public TecTechGUIClientConfig(GuiScreen parentScreen) throws ConfigException { - super( - parentScreen, - TecTech.ID, - "TecTech - Tec Technology!", - false, - ConfigHandler.class); + super(parentScreen, TecTech.ID, "TecTech - Tec Technology!", false, ConfigHandler.class); } } diff --git a/src/main/java/tectech/loader/gui/TecTechGUIFactory.java b/src/main/java/tectech/loader/gui/TecTechGUIFactory.java index 1e9791afc63..f618e77a8cf 100644 --- a/src/main/java/tectech/loader/gui/TecTechGUIFactory.java +++ b/src/main/java/tectech/loader/gui/TecTechGUIFactory.java @@ -1,8 +1,9 @@ package tectech.loader.gui; -import com.gtnewhorizon.gtnhlib.config.SimpleGuiFactory; import net.minecraft.client.gui.GuiScreen; +import com.gtnewhorizon.gtnhlib.config.SimpleGuiFactory; + public class TecTechGUIFactory implements SimpleGuiFactory { @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java index 11c67b4c790..e226162312d 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java @@ -30,7 +30,6 @@ import tectech.Reference; import tectech.TecTech; import tectech.loader.ConfigHandler; -import tectech.loader.TecTechConfig; import tectech.util.CommonValues; import tectech.util.TTUtility; diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java index 0e048d64244..0d98f127426 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java @@ -42,7 +42,6 @@ import gregtech.api.objects.GTRenderedTexture; import tectech.TecTech; import tectech.loader.ConfigHandler; -import tectech.loader.TecTechConfig; import tectech.thing.gui.TecTechUITextures; import tectech.util.CommonValues; import tectech.util.TTUtility; diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEEnergyInfuser.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEEnergyInfuser.java index e3546a5e3fe..cdc4b07a56f 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEEnergyInfuser.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEEnergyInfuser.java @@ -33,7 +33,6 @@ import tectech.Reference; import tectech.TecTech; import tectech.loader.ConfigHandler; -import tectech.loader.TecTechConfig; import tectech.thing.casing.BlockGTCasingsTT; import tectech.thing.casing.TTCasingsContainer; import tectech.thing.metaTileEntity.multi.base.TTMultiblockBase; diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index e0d07bf1663..4ced494b053 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -101,7 +101,6 @@ import gregtech.common.tileentities.machines.MTEHatchOutputBusME; import tectech.TecTech; import tectech.loader.ConfigHandler; -import tectech.loader.TecTechConfig; import tectech.thing.block.BlockGodforgeGlass; import tectech.thing.block.TileEntityForgeOfGods; import tectech.thing.gui.TecTechUITextures; diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTETeslaTower.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTETeslaTower.java index beabd7a05c0..d5b46688114 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTETeslaTower.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTETeslaTower.java @@ -61,7 +61,6 @@ import gregtech.api.util.IGTHatchAdder; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.shutdown.ShutDownReason; -import tectech.TecTech; import tectech.loader.ConfigHandler; import tectech.loader.NetworkDispatcher; import tectech.mechanics.spark.RendererMessage; @@ -93,28 +92,32 @@ public class MTETeslaTower extends TTMultiblockBase implements ISurvivalConstruc // region variables private static final int transferRadiusTowerFromConfig = ConfigHandler.teslaTweaks.TESLA_MULTI_RANGE_TOWER; // Default - // is 32 + // is 32 private static final int transferRadiusTransceiverFromConfig = ConfigHandler.teslaTweaks.TESLA_MULTI_RANGE_TRANSCEIVER; // Default - // is - // 16 + // is + // 16 private static final int transferRadiusCoverUltimateFromConfig = ConfigHandler.teslaTweaks.TESLA_MULTI_RANGE_COVER; // Default - // is - // 16 + // is + // 16 private static final int plasmaRangeMultiT1 = ConfigHandler.teslaTweaks.TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1; // Default - // is 2 + // is 2 private static final int plasmaRangeMultiT2 = ConfigHandler.teslaTweaks.TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2; // Default - // is 4 - private static final int heliumUse = ConfigHandler.teslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM; // Default is - // 100 + // is 4 + private static final int heliumUse = ConfigHandler.teslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM; // Default + // is + // 100 private static final int nitrogenUse = ConfigHandler.teslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN; // Default - // is 50 - private static final int radonUse = ConfigHandler.teslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON; // Default is 50 + // is 50 + private static final int radonUse = ConfigHandler.teslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON; // Default is + // 50 private static final boolean visualEffect = ConfigHandler.teslaTweaks.TESLA_VISUAL_EFFECT; // Default is true // Default is {1, 1, 1} private static final int[] plasmaTierLoss = new int[] { ConfigHandler.teslaTweaks.TESLA_MULTI_LOSS_PER_BLOCK_T0, - ConfigHandler.teslaTweaks.TESLA_MULTI_LOSS_PER_BLOCK_T1, ConfigHandler.teslaTweaks.TESLA_MULTI_LOSS_PER_BLOCK_T2 }; - private static final float overDriveLoss = ConfigHandler.teslaTweaks.TESLA_MULTI_LOSS_FACTOR_OVERDRIVE; // Default is - // 0.25F; + ConfigHandler.teslaTweaks.TESLA_MULTI_LOSS_PER_BLOCK_T1, + ConfigHandler.teslaTweaks.TESLA_MULTI_LOSS_PER_BLOCK_T2 }; + private static final float overDriveLoss = ConfigHandler.teslaTweaks.TESLA_MULTI_LOSS_FACTOR_OVERDRIVE; // Default + // is + // 0.25F; private static final boolean doFluidOutput = ConfigHandler.teslaTweaks.TESLA_MULTI_GAS_OUTPUT; // Default is false // Face icons diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java b/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java index 000a1b1f270..5f98f3c45a9 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java @@ -94,7 +94,6 @@ import tectech.Reference; import tectech.TecTech; import tectech.loader.ConfigHandler; -import tectech.loader.TecTechConfig; import tectech.thing.gui.TecTechUITextures; import tectech.thing.metaTileEntity.hatch.MTEHatchDataConnector; import tectech.thing.metaTileEntity.hatch.MTEHatchDataInput; diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java index 62bce7b6c48..8a66736726b 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java @@ -44,7 +44,6 @@ import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; import tectech.loader.ConfigHandler; -import tectech.loader.TecTechConfig; import tectech.recipe.TecTechRecipeMaps; import tectech.util.CommonValues; diff --git a/src/main/java/tectech/thing/metaTileEntity/single/MTETeslaCoil.java b/src/main/java/tectech/thing/metaTileEntity/single/MTETeslaCoil.java index 88184e6f073..e1b5125315b 100644 --- a/src/main/java/tectech/thing/metaTileEntity/single/MTETeslaCoil.java +++ b/src/main/java/tectech/thing/metaTileEntity/single/MTETeslaCoil.java @@ -27,7 +27,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicBatteryBuffer; -import tectech.TecTech; import tectech.loader.ConfigHandler; import tectech.loader.NetworkDispatcher; import tectech.mechanics.spark.RendererMessage; @@ -49,8 +48,9 @@ public class MTETeslaCoil extends MTEBasicBatteryBuffer implements ITeslaConnect private static final int transferRadiusMax = ConfigHandler.teslaTweaks.TESLA_SINGLE_RANGE; // Default is 20 private static final int perBlockLoss = ConfigHandler.teslaTweaks.TESLA_SINGLE_LOSS_PER_BLOCK; // Default is 1 - private static final float overDriveLoss = ConfigHandler.teslaTweaks.TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE; // Default is - // 0.25F + private static final float overDriveLoss = ConfigHandler.teslaTweaks.TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE; // Default + // is + // 0.25F private static final int transferRadiusMin = 4; // Minimum user configurable private int transferRadius = transferRadiusMax; // Default transferRadius setting