Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
boubou19 committed Sep 17, 2024
1 parent 57157a9 commit c0afe1a
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 60 deletions.
11 changes: 3 additions & 8 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 @@ -45,6 +40,7 @@
+ "after:CoFHCore;"
+ "after:Thaumcraft;")
public class TecTech {

static {
try {
ConfigurationManager.registerConfig(ConfigHandler.class);
Expand All @@ -62,7 +58,6 @@ public class TecTech {
public static final LogHelper LOGGER = new LogHelper(Reference.MODID);
public static CreativeTabTecTech creativeTabTecTech;


public static EnderWorldSavedData enderWorldSavedData;

/**
Expand Down
34 changes: 19 additions & 15 deletions src/main/java/tectech/loader/ConfigHandler.java
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
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 TeslaTweaks teslaTweaks = new TeslaTweaks();

@Config.Comment("Debug section")
public static class Debug{
public static class Debug {

@Config.Comment("Enables logging and other purely debug features")
@Config.DefaultBoolean(false)
public boolean DEBUG_MODE;
}

@Config.Comment("Tesla tweaks section")
public static class TeslaTweaks{
public static class TeslaTweaks {

@Config.Ignore()
public static final float TESLA_MULTI_LOSS_FACTOR_OVERDRIVE=0.25f;
public static final float TESLA_MULTI_LOSS_FACTOR_OVERDRIVE = 0.25f;
@Config.Ignore()
public static final int TESLA_MULTI_LOSS_PER_BLOCK_T0=1;
public static final int TESLA_MULTI_LOSS_PER_BLOCK_T0 = 1;
@Config.Ignore()
public static final int TESLA_MULTI_LOSS_PER_BLOCK_T1=1;
public static final int TESLA_MULTI_LOSS_PER_BLOCK_T1 = 1;
@Config.Ignore()
public static final int TESLA_MULTI_LOSS_PER_BLOCK_T2=1;
public static final int TESLA_MULTI_LOSS_PER_BLOCK_T2 = 1;
@Config.Ignore()
public static final int TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM=100;
public static final int TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM = 100;
@Config.Ignore()
public static final int TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN=50;
public static final int TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN = 50;
@Config.Ignore()
public static final int TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON=50;
public static final int TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON = 50;
@Config.Ignore()
public static final int TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1=2;
public static final int TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1 = 2;
@Config.Ignore()
public static final int TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2=4;
public static final int TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2 = 4;
@Config.Ignore()
public static final int TESLA_MULTI_RANGE_COVER=16;
public static final int TESLA_MULTI_RANGE_COVER = 16;
@Config.Ignore()
public static final int TESLA_MULTI_RANGE_TOWER=32;
public static final int TESLA_MULTI_RANGE_TOWER = 32;
@Config.Ignore()
public static final int TESLA_MULTI_RANGE_TRANSCEIVER=16;
public static final int TESLA_MULTI_RANGE_TRANSCEIVER = 16;
@Config.Ignore()
public static final float TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE=0.25f;
public static final float TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE = 0.25f;
@Config.Ignore()
public static final int TESLA_SINGLE_LOSS_PER_BLOCK = 1;

Expand Down
10 changes: 0 additions & 10 deletions src/main/java/tectech/loader/MainLoader.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
package tectech.loader;

import static gregtech.api.enums.Mods.NewHorizonsCoreMod;
import static gregtech.api.enums.Mods.TwilightForest;
import static tectech.TecTech.LOGGER;
import static tectech.TecTech.creativeTabTecTech;
import static tectech.TecTech.proxy;

import java.util.HashMap;

import net.minecraft.block.Block;
import net.minecraft.util.DamageSource;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;

import cpw.mods.fml.common.ProgressManager;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTechAPI;
import gregtech.api.enums.Materials;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.util.GTRecipe;
import tectech.TecTech;
import tectech.loader.gui.CreativeTabTecTech;
import tectech.loader.recipe.BaseRecipeLoader;
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 @@ -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 @@ -288,7 +287,7 @@ public class MTETeslaTower extends TTMultiblockBase implements ISurvivalConstruc
if (Double.isNaN(value)) return LedStatus.STATUS_WRONG;
value = (int) value;
if (value < 0) return LedStatus.STATUS_TOO_LOW;
if (value >ConfigHandler.TeslaTweaks.TESLA_MULTI_RANGE_COVER) return LedStatus.STATUS_HIGH;
if (value > ConfigHandler.TeslaTweaks.TESLA_MULTI_RANGE_COVER) return LedStatus.STATUS_HIGH;
if (value < ConfigHandler.TeslaTweaks.TESLA_MULTI_RANGE_COVER) return LedStatus.STATUS_LOW;
return LedStatus.STATUS_OK;
};
Expand Down Expand Up @@ -397,19 +396,22 @@ private void checkPlasmaBoost() {
if (fluidHatch.mFluid != null) {
if (fluidHatch.mFluid.isFluidEqual(Materials.Helium.getPlasma(1))
&& fluidHatch.mFluid.amount >= ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM) {
fluidHatch.mFluid.amount = fluidHatch.mFluid.amount - ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM;
fluidHatch.mFluid.amount = fluidHatch.mFluid.amount
- ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM;

plasmaTier = 1;
return;
} else if (fluidHatch.mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))
&& fluidHatch.mFluid.amount >= ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN) {
fluidHatch.mFluid.amount = fluidHatch.mFluid.amount - ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN;
} else if (fluidHatch.mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && fluidHatch.mFluid.amount
>= ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN) {
fluidHatch.mFluid.amount = fluidHatch.mFluid.amount
- ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN;

plasmaTier = 1;
return;
} else if (fluidHatch.mFluid.isFluidEqual(Materials.Radon.getPlasma(1))
&& fluidHatch.mFluid.amount >= ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON) {
fluidHatch.mFluid.amount = fluidHatch.mFluid.amount -ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON;
} else if (fluidHatch.mFluid.isFluidEqual(Materials.Radon.getPlasma(1)) && fluidHatch.mFluid.amount
>= ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON) {
fluidHatch.mFluid.amount = fluidHatch.mFluid.amount
- ConfigHandler.TeslaTweaks.TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON;

plasmaTier = 2;
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.jetbrains.annotations.NotNull;
import org.lwjgl.opengl.GL11;

import com.google.common.collect.Iterables;
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.alignment.IAlignment;
import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider;
Expand Down Expand Up @@ -69,7 +68,6 @@
import gregtech.api.interfaces.modularui.IBindPlayerInventoryUI;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.BaseTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase;
import gregtech.api.metatileentity.implementations.MTEHatch;
import gregtech.api.metatileentity.implementations.MTEHatchDynamo;
Expand All @@ -89,7 +87,6 @@
import gregtech.api.util.shutdown.ShutDownReason;
import gregtech.api.util.shutdown.ShutDownReasonRegistry;
import gregtech.api.util.shutdown.SimpleShutDownReason;
import gregtech.common.Pollution;
import gregtech.common.tileentities.machines.IDualInputHatch;
import tectech.Reference;
import tectech.TecTech;
Expand Down Expand Up @@ -1745,13 +1742,11 @@ public boolean explodesOnComponentBreak(ItemStack itemStack) {

// empty body to prevent any explosion
@Override
public final void explodeMultiblock() {
}
public final void explodeMultiblock() {}

// empty body to prevent any explosion
@Override
public void doExplosion(long aExplosionPower) {
}
public void doExplosion(long aExplosionPower) {}

// region adder methods
@Override
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 Down

0 comments on commit c0afe1a

Please sign in to comment.