Skip to content

Commit

Permalink
Spotless apply for branch config/tectech for #3207 (#3208)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub GTNH Actions <>
  • Loading branch information
github-actions[bot] authored Sep 16, 2024
1 parent bf0394a commit 8156e29
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 50 deletions.
10 changes: 3 additions & 7 deletions src/main/java/tectech/TecTech.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -47,6 +42,7 @@
+ "after:CoFHCore;"
+ "after:Thaumcraft;")
public class TecTech {

static {
try {
ConfigurationManager.registerConfig(ConfigHandler.class);
Expand Down
14 changes: 10 additions & 4 deletions src/main/java/tectech/loader/ConfigHandler.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/tectech/loader/MainLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 1 addition & 4 deletions src/main/java/tectech/loader/TecTechConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
15 changes: 6 additions & 9 deletions src/main/java/tectech/loader/gui/TecTechGUIClientConfig.java
Original file line number Diff line number Diff line change
@@ -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);
}
}
3 changes: 2 additions & 1 deletion src/main/java/tectech/loader/gui/TecTechGUIFactory.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
33 changes: 18 additions & 15 deletions src/main/java/tectech/thing/metaTileEntity/multi/MTETeslaTower.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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

Expand Down

0 comments on commit 8156e29

Please sign in to comment.