diff options
| author | miozune <miozune@gmail.com> | 2023-02-05 01:40:43 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-04 17:40:43 +0100 |
| commit | bb9da48b9975cb27e3b7c538bff2853a34b36fcd (patch) | |
| tree | 9de91abf611bf119935df6322e27805cf835fafc /src/main/java/gtPlusPlus/xmod/gregtech/registration | |
| parent | 8792eb5d9b70cbb1dc0b444cfd8524dfb4a0aa0c (diff) | |
| download | GT5-Unofficial-bb9da48b9975cb27e3b7c538bff2853a34b36fcd.tar.gz GT5-Unofficial-bb9da48b9975cb27e3b7c538bff2853a34b36fcd.tar.bz2 GT5-Unofficial-bb9da48b9975cb27e3b7c538bff2853a34b36fcd.zip | |
Remove redundant flags (#529)
* Remove CORE.GTNH
* Remove LoadedMods.Gregtech
* Remove LoadedMods.IndustrialCraft2
* Remove LoadedMods.MiscUtils
* Remove CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK
* clean
* Remove mention to GT versions
* Fix assembler mode
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/registration')
59 files changed, 685 insertions, 1252 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java index 36035364c0..db616360d0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java @@ -3,7 +3,6 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; import gregtech.api.GregTech_API; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.tileentities.automation.*; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_CropHarvestor; @@ -20,18 +19,16 @@ public class Gregtech4Content { // ID Range 828, 829, 833 - 850 public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Max MTE: " + GregTech_API.METATILEENTITIES.length + " | " + GregTech_API.MAXIMUM_METATILE_IDS); - workbenches(); - thermalBoiler(); - multiCrafter(); - tesseracts(); - shelves(); - basic(); - automation(); - redstone(); - computer(); - } + Logger.INFO("Max MTE: " + GregTech_API.METATILEENTITIES.length + " | " + GregTech_API.MAXIMUM_METATILE_IDS); + workbenches(); + thermalBoiler(); + multiCrafter(); + tesseracts(); + shelves(); + basic(); + automation(); + redstone(); + computer(); } private static void computer() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java index 23d9cb88fa..85d2f87513 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java @@ -7,7 +7,6 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.core.recipe.RECIPES_MachineComponents; import gtPlusPlus.core.util.minecraft.ItemUtils; @@ -19,10 +18,8 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity public class GregtechAdvancedBoilers { public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Advanced Boilers."); - run1(); - } + Logger.INFO("Gregtech5u Content | Registering Advanced Boilers."); + run1(); } private static void run1() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java index 27de5556b2..63ca1a3d37 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAlgaeContent.java @@ -3,7 +3,6 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; import gregtech.api.GregTech_API; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_Catalysts; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.algae.GregtechMTE_AlgaePondBase; @@ -12,10 +11,8 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.ch public class GregtechAlgaeContent { public static void run() { - if (LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Algae Content."); - run1(); - } + Logger.INFO("Gregtech5u Content | Registering Algae Content."); + run1(); } private static void run1() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java index 4c0a32d12a..9dee13eddb 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java @@ -7,10 +7,8 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc.GMTE_Ama public class GregtechAmazonWarehouse { public static void run() { - if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Amazon Warehouse Multiblock."); - run1(); - } + Logger.INFO("Gregtech5u Content | Registering Amazon Warehouse Multiblock."); + run1(); } private static void run1() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java index d2d42504db..dcd11a4dba 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java @@ -11,7 +11,6 @@ import net.minecraftforge.oredict.OreDictionary; import gregtech.api.enums.*; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; import gregtech.api.util.GTPP_Recipe; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.ItemUtils; @@ -25,12 +24,6 @@ public class GregtechComponentAssembler { return; } - if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - Logger.INFO( - "Component Assemblers cannot be created in 5.08.33 during the pre-release. Please wait for 1.7.0 release."); - return; - } - GregtechItemList.Machine_LV_Component_Maker.set( new GT_MetaTileEntity_BasicMachine_GT_Recipe( 985, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java index aadf6f4a12..4a4c7f7e7a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -1,8 +1,5 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; -import static gtPlusPlus.core.lib.CORE.GTNH; -import static gtPlusPlus.core.lib.LoadedMods.Gregtech; - import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; @@ -35,26 +32,6 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaP public class GregtechConduits { - /** - * - * The Voltage Tiers. Use this Array instead of the old named Voltage Variables public static final long[] V = new - * long[] {0=8, 1=32, 2=128, 3=512, 4=2048, 5=8192, 6=32768, 7=131072, 8=524288, 9=Integer.MAX_VALUE, - * Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, - * Integer.MAX_VALUE}; - * - */ - public static OrePrefixes cableGt16; - - static { - if (GTNH) { - try { - cableGt16 = (OrePrefixes) GT_Utility.getField(OrePrefixes.class, "cableGt16").get(null); - } catch (IllegalAccessException | NullPointerException e) { - e.printStackTrace(); - } - } - } - // 30000-30999 private static int BaseWireID = 30600; @@ -62,119 +39,115 @@ public class GregtechConduits { private static int BasePipeHexadecupleID = 30100; public static void run() { - if (Gregtech) { - Logger.INFO("Gregtech5u Content | Registering Custom Cables/Wires/Pipes."); - if (CORE.ConfigSwitches.enableCustom_Cables) { - run1(); - } - if (CORE.ConfigSwitches.enableCustom_Pipes) { - run2(); - run3(); - } + Logger.INFO("Gregtech5u Content | Registering Custom Cables/Wires/Pipes."); + if (CORE.ConfigSwitches.enableCustom_Cables) { + run1(); + } + if (CORE.ConfigSwitches.enableCustom_Pipes) { + run2(); + run3(); } } private static void run3() { - if (Utils.getGregtechVersionAsInt() >= 50930) { - try { - Class<GT_MetaPipeEntity_Fluid> aPipeEntity = GT_MetaPipeEntity_Fluid.class; - Constructor<GT_MetaPipeEntity_Fluid> constructor = aPipeEntity.getConstructor( - int.class, - String.class, - String.class, - float.class, - Materials.class, - int.class, - int.class, - boolean.class, - int.class); - if (constructor != null) { - Logger.INFO("Generating Hexadecuple pipes."); - generateFluidMultiPipes( - constructor, - Materials.Copper, - MaterialUtils.getMaterialName(Materials.Copper), - "Copper", - BasePipeHexadecupleID++, - 60, - 1000, - true); - generateFluidMultiPipes( - constructor, - Materials.Bronze, - MaterialUtils.getMaterialName(Materials.Bronze), - "Bronze", - BasePipeHexadecupleID++, - 120, - 2000, - true); - generateFluidMultiPipes( - constructor, - Materials.Steel, - MaterialUtils.getMaterialName(Materials.Steel), - "Steel", - BasePipeHexadecupleID++, - 240, - 2500, - true); - generateFluidMultiPipes( - constructor, - Materials.StainlessSteel, - MaterialUtils.getMaterialName(Materials.StainlessSteel), - "Stainless Steel", - BasePipeHexadecupleID++, - 360, - 3000, - true); + try { + Class<GT_MetaPipeEntity_Fluid> aPipeEntity = GT_MetaPipeEntity_Fluid.class; + Constructor<GT_MetaPipeEntity_Fluid> constructor = aPipeEntity.getConstructor( + int.class, + String.class, + String.class, + float.class, + Materials.class, + int.class, + int.class, + boolean.class, + int.class); + if (constructor != null) { + Logger.INFO("Generating Hexadecuple pipes."); + generateFluidMultiPipes( + constructor, + Materials.Copper, + MaterialUtils.getMaterialName(Materials.Copper), + "Copper", + BasePipeHexadecupleID++, + 60, + 1000, + true); + generateFluidMultiPipes( + constructor, + Materials.Bronze, + MaterialUtils.getMaterialName(Materials.Bronze), + "Bronze", + BasePipeHexadecupleID++, + 120, + 2000, + true); + generateFluidMultiPipes( + constructor, + Materials.Steel, + MaterialUtils.getMaterialName(Materials.Steel), + "Steel", + BasePipeHexadecupleID++, + 240, + 2500, + true); + generateFluidMultiPipes( + constructor, + Materials.StainlessSteel, + MaterialUtils.getMaterialName(Materials.StainlessSteel), + "Stainless Steel", + BasePipeHexadecupleID++, + 360, + 3000, + true); + generateFluidMultiPipes( + constructor, + Materials.Titanium, + MaterialUtils.getMaterialName(Materials.Titanium), + "Titanium", + BasePipeHexadecupleID++, + 480, + 5000, + true); + generateFluidMultiPipes( + constructor, + Materials.TungstenSteel, + MaterialUtils.getMaterialName(Materials.TungstenSteel), + "Tungsten Steel", + BasePipeHexadecupleID++, + 600, + 7500, + true); + generateFluidMultiPipes( + constructor, + Materials.Plastic, + MaterialUtils.getMaterialName(Materials.Plastic), + "Plastic", + BasePipeHexadecupleID++, + 360, + 350, + true); + + Materials aPTFE = Materials.get("Polytetrafluoroethylene"); + if (aPTFE != null) { generateFluidMultiPipes( constructor, - Materials.Titanium, - MaterialUtils.getMaterialName(Materials.Titanium), - "Titanium", + aPTFE, + MaterialUtils.getMaterialName(aPTFE), |
