Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/config/gtpp' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/gtPlusPlus/core/item/ModItems.java
  • Loading branch information
Dream-Master committed Sep 17, 2024
2 parents 5afbb04 + b335469 commit 0853e63
Show file tree
Hide file tree
Showing 126 changed files with 2,240 additions and 3,038 deletions.
31 changes: 31 additions & 0 deletions src/main/java/gregtech/api/enums/MetaTileEntityIDs.java
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,24 @@ public enum MetaTileEntityIDs {
Hatch_Muffler_Adv_UV(30008),
Hatch_Muffler_Adv_MAX(30009),
Hatch_Turbine_Rotor(30010),
Hatch_SuperBus_Input_LV(30022),
Hatch_SuperBus_Input_MV(30023),
Hatch_SuperBus_Input_HV(30024),
Hatch_SuperBus_Input_EV(30025),
Hatch_SuperBus_Input_IV(30026),
Hatch_SuperBus_Input_LuV(30027),
Hatch_SuperBus_Input_ZPM(30028),
Hatch_SuperBus_Input_UV(30029),
Hatch_SuperBus_Input_UHV(30030),
Hatch_SuperBus_Output_LV(30032),
Hatch_SuperBus_Output_MV(30033),
Hatch_SuperBus_Output_HV(30034),
Hatch_SuperBus_Output_EV(30035),
Hatch_SuperBus_Output_IV(30036),
Hatch_SuperBus_Output_LuV(30037),
Hatch_SuperBus_Output_ZPM(30038),
Hatch_SuperBus_Output_UV(30039),
Hatch_SuperBus_Output_UHV(30040),
PipeIncoloy903(30995),
Infinite_Item_Chest(31010),
SimpleDustWasher_MV(31017),
Expand Down Expand Up @@ -1885,10 +1903,23 @@ public enum MetaTileEntityIDs {
GT4_Crop_Harvester_UV(31118),
Mega_AlloyBlastSmelter(31150),
QuantumForceTransformer(31151),
GT_MetaTileEntity_ChiselBus_LV(31778),
GT_MetaTileEntity_ChiselBus_MV(31779),
GT_MetaTileEntity_ChiselBus_HV(31780),
GT_MetaTileEntity_Solidifier_I(31781),
GT_MetaTileEntity_Solidifier_II(31782),
GT_MetaTileEntity_Solidifier_III(31783),
GT_MetaTileEntity_Solidifier_IV(31784),
SimpleDustWasher_LV(31790),
SimpleDustWasher_HV(31791),
SimpleDustWasher_IV(31792),
SimpleDustWasher_ZPM(31793),
RedstoneButtonPanel(31800),
RedstoneCircuitBlock(31801),
RedstoneLamp(31803),
RedstoneStrengthDisplay(31804),
RedstoneStrengthScale(31805),
WaterPump(31085),
UniversalChemicalFuelEngine(32001),
LargeEssentiaGenerator(32002),
NeutronAcceleratorULV(32003),
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/gregtech/asm/GTCorePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import cpw.mods.fml.relauncher.FMLInjectionData;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import gregtech.mixin.Mixin;
import gtPlusPlus.core.config.ASMConfiguration;
import gtPlusPlus.preloader.PreloaderCore;
import gtPlusPlus.preloader.asm.AsmConfig;
import gtPlusPlus.preloader.asm.PreloaderDummyContainer;
import gtPlusPlus.preloader.asm.transformers.Preloader_Transformer_Handler;

Expand All @@ -27,6 +27,7 @@ public class GTCorePlugin implements IFMLLoadingPlugin, IEarlyMixinLoader {
static {
try {
ConfigurationManager.registerConfig(Configuration.class);
ConfigurationManager.registerConfig(ASMConfiguration.class);
} catch (ConfigException e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -64,7 +65,7 @@ public void injectData(Map<String, Object> data) {
if (mcDir != null && mcDir.exists()) {
PreloaderCore.setMinecraftDirectory(mcDir);
}
PreloaderCore.DEBUG_MODE = AsmConfig.debugMode;
PreloaderCore.DEBUG_MODE = ASMConfiguration.debug.debugMode;
}

@Override
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/gtPlusPlus/GTplusplus.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static gregtech.api.enums.Mods.GTPlusPlus;
import static gregtech.api.enums.Mods.Names;
import static gregtech.api.enums.Mods.Thaumcraft;
import static gtPlusPlus.core.lib.GTPPCore.ConfigSwitches.enableCustomCapes;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
Expand All @@ -13,6 +12,9 @@
import net.minecraft.item.Item;
import net.minecraft.launchwrapper.Launch;

import com.gtnewhorizon.gtnhlib.config.ConfigException;
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
Expand All @@ -34,16 +36,14 @@
import gregtech.api.util.SemiFluidFuelHandler;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.recipe.GTPPRecipeMaps;
import gtPlusPlus.core.commands.CommandEnableDebugWhileRunning;
import gtPlusPlus.core.commands.CommandMath;
import gtPlusPlus.core.common.CommonProxy;
import gtPlusPlus.core.config.ConfigHandler;
import gtPlusPlus.core.config.Configuration;
import gtPlusPlus.core.handler.BookHandler;
import gtPlusPlus.core.handler.PacketHandler;
import gtPlusPlus.core.handler.Recipes.RegistrationHandler;
import gtPlusPlus.core.lib.GTPPCore;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.data.LocaleUtils;
import gtPlusPlus.plugin.manager.CoreManager;
import gtPlusPlus.xmod.gregtech.common.MetaGTProxy;
Expand All @@ -57,6 +57,7 @@
modid = Names.G_T_PLUS_PLUS,
name = GTPPCore.name,
version = GTPPCore.VERSION,
guiFactory = "gtPlusPlus.core.gui.config.GTPPGuiFactory",
dependencies = "required-after:Forge;" + " after:TConstruct;"
+ " after:dreamcraft;"
+ " after:IC2;"
Expand Down Expand Up @@ -109,6 +110,13 @@ public final synchronized void setPhaseActive(boolean aIsPhaseActive) {
}
}

static {
try {
ConfigurationManager.registerConfig(Configuration.class);
} catch (ConfigException e) {
throw new RuntimeException(e);
}
}
public static INIT_PHASE CURRENT_LOAD_PHASE = INIT_PHASE.SUPER;

// Mod Instance
Expand Down Expand Up @@ -150,16 +158,9 @@ public void preInit(final FMLPreInitializationEvent event) {
CoreManager.veryEarlyInit();
PacketHandler.init();

if (!Utils.isServer()) {
enableCustomCapes = true;
}

// Give this a go mate.
setupMaterialBlacklist();

// Handle GT++ Config
ConfigHandler.handleConfigFile(event);

// Check for Dev
GTPPCore.DEVENV = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");

Expand All @@ -178,7 +179,7 @@ public void init(final FMLInitializationEvent event) {
MetaGTProxy.init();
CoreManager.init();
// Used by foreign players to generate .lang files for translation.
if (GTPPCore.ConfigSwitches.dumpItemAndBlockData) {
if (Configuration.debug.dumpItemAndBlockData) {
LocaleUtils.generateFakeLocaleFile();
}
}
Expand Down Expand Up @@ -222,7 +223,6 @@ public void postInit(final FMLPostInitializationEvent event) {
public synchronized void serverStarting(final FMLServerStartingEvent event) {
INIT_PHASE.SERVER_START.setPhaseActive(true);
event.registerServerCommand(new CommandMath());
event.registerServerCommand(new CommandEnableDebugWhileRunning());
if (Thaumcraft.isModLoaded()) {
event.registerServerCommand(new CommandDumpAspects());
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/gtPlusPlus/api/objects/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
import gtPlusPlus.core.lib.GTPPCore;
import gtPlusPlus.core.config.ASMConfiguration;
import gtPlusPlus.core.config.Configuration;
import gtPlusPlus.preloader.PreloaderCore;
import gtPlusPlus.preloader.asm.AsmConfig;

public class Logger {

Expand All @@ -21,7 +21,7 @@ public static org.apache.logging.log4j.Logger makeLogger() {
return gtPlusPlusLogger;
}

private static final boolean enabled = !AsmConfig.disableAllLogging;
private static final boolean enabled = !ASMConfiguration.debug.disableAllLogging;

public static final org.apache.logging.log4j.Logger getLogger() {
return modLogger;
Expand All @@ -38,7 +38,7 @@ public static void INFO(final String s) {
public static void MACHINE_INFO(String s, Object... args) {
if (enabled) {
boolean localPlayer = PreloaderCore.DEV_ENVIRONMENT;
if (GTPPCore.ConfigSwitches.MACHINE_INFO || localPlayer) {
if (Configuration.debug.MachineInfo || localPlayer) {
final String name1 = gtPlusPlus.core.util.reflect.ReflectionUtils.getMethodName(2);
modLogger.info("Machine Info: " + s + " | " + name1, args);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import gregtech.api.util.GTLanguageManager;
import gregtech.api.util.GTOreDictUnificator;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.config.Configuration;
import gtPlusPlus.core.item.base.itemblock.ItemBlockGtBlock;
import gtPlusPlus.core.lib.GTPPCore;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
Expand Down Expand Up @@ -198,7 +198,7 @@ public Material getMaterialEx() {
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(final IIconRegister iIcon) {
if (!GTPPCore.ConfigSwitches.useGregtechTextures || this.blockMaterial == null
if (!Configuration.visual.useGregtechTextures || this.blockMaterial == null
|| this.thisBlock == BlockTypes.ORE) {
this.blockIcon = iIcon.registerIcon(GTPlusPlus.ID + ":" + this.thisBlock.getTexture());
}
Expand Down
Loading

0 comments on commit 0853e63

Please sign in to comment.