From f407083435a4b0989c50ce33abce7b8be0acc5c5 Mon Sep 17 00:00:00 2001 From: Zorbatron Date: Wed, 11 Sep 2024 23:30:20 -0400 Subject: [PATCH] Eek! (#26) --- .../java/com/zorbatron/zbgt/ZBGTCore.java | 4 +- .../api/pattern/TraceabilityPredicates.java | 11 +--- .../zbgt/common/ZBGTMetaTileEntities.java | 59 +++++++++---------- .../zbgt/materials/ZBGTMaterialOverrides.java | 7 +-- .../zbgt/recipe/MultiblockPartRecipes.java | 7 +-- 5 files changed, 35 insertions(+), 53 deletions(-) diff --git a/src/main/java/com/zorbatron/zbgt/ZBGTCore.java b/src/main/java/com/zorbatron/zbgt/ZBGTCore.java index fe0fe717..74fe924b 100644 --- a/src/main/java/com/zorbatron/zbgt/ZBGTCore.java +++ b/src/main/java/com/zorbatron/zbgt/ZBGTCore.java @@ -25,7 +25,9 @@ version = ZBGTCore.VERSION, name = ZBGTCore.NAME, acceptedMinecraftVersions = "[1.12.2]", - dependencies = GTInternalTags.DEP_VERSION_STRING) + dependencies = GTInternalTags.DEP_VERSION_STRING + + "required-after:gcym@[1.2.11,);" + + "after:appliedenergistics2;") public class ZBGTCore { public static final String MODID = Tags.MODID; diff --git a/src/main/java/com/zorbatron/zbgt/api/pattern/TraceabilityPredicates.java b/src/main/java/com/zorbatron/zbgt/api/pattern/TraceabilityPredicates.java index a394b3ca..75a6fbe4 100644 --- a/src/main/java/com/zorbatron/zbgt/api/pattern/TraceabilityPredicates.java +++ b/src/main/java/com/zorbatron/zbgt/api/pattern/TraceabilityPredicates.java @@ -9,7 +9,6 @@ import net.minecraft.block.state.IBlockState; import com.zorbatron.zbgt.api.ZBGTAPI; -import com.zorbatron.zbgt.api.util.ZBGTMods; import com.zorbatron.zbgt.common.block.blocks.CoALCasing; import com.zorbatron.zbgt.common.block.blocks.PreciseCasing; @@ -178,13 +177,9 @@ public static TraceabilityPredicate maintenanceOrParallel(MultiblockControllerBa TraceabilityPredicate predicate = new TraceabilityPredicate( abilities(MultiblockAbility.MAINTENANCE_HATCH).setExactLimit(1)); - // Check if GYCM is loaded before checking if the controller is an IParallelMultiblock because if it isn't bad - // stuff will happen - if (ZBGTMods.GCYM.isModLoaded()) { - if (controller instanceof IParallelMultiblock) { - predicate = predicate - .or(abilities(GCYMMultiblockAbility.PARALLEL_HATCH).setMaxGlobalLimited(1).setPreviewCount(1)); - } + if (controller instanceof IParallelMultiblock) { + predicate = predicate + .or(abilities(GCYMMultiblockAbility.PARALLEL_HATCH).setMaxGlobalLimited(1).setPreviewCount(1)); } return predicate; diff --git a/src/main/java/com/zorbatron/zbgt/common/ZBGTMetaTileEntities.java b/src/main/java/com/zorbatron/zbgt/common/ZBGTMetaTileEntities.java index 205b1de4..a3f7e958 100644 --- a/src/main/java/com/zorbatron/zbgt/common/ZBGTMetaTileEntities.java +++ b/src/main/java/com/zorbatron/zbgt/common/ZBGTMetaTileEntities.java @@ -3,7 +3,6 @@ import static com.zorbatron.zbgt.ZBGTUtility.zbgtId; import static gregtech.common.metatileentities.MetaTileEntities.registerMetaTileEntity; -import com.zorbatron.zbgt.api.util.ZBGTMods; import com.zorbatron.zbgt.common.metatileentities.multi.electric.*; import com.zorbatron.zbgt.common.metatileentities.multi.electric.megamultis.*; import com.zorbatron.zbgt.common.metatileentities.multi.electric.quads.MetaTileEntityQuadEBF; @@ -66,44 +65,40 @@ public static void init() { SUPER_INPUT_BUS = registerMetaTileEntity(18009, new MetaTileEntitySuperInputBus(zbgtId("super_input_bus"))); - if (ZBGTMods.GCYM.isModLoaded()) { - ZBGT_PARALLEL_HATCHES[0] = registerMetaTileEntity(18010, new MetaTileEntityLargeParallelHatch( - zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.UEV])), GTValues.UHV, 1024)); - ZBGT_PARALLEL_HATCHES[1] = registerMetaTileEntity(18011, new MetaTileEntityLargeParallelHatch( - zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.UIV])), GTValues.UEV, 4096)); - ZBGT_PARALLEL_HATCHES[2] = registerMetaTileEntity(18012, new MetaTileEntityLargeParallelHatch( - zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.UXV])), GTValues.UIV, 16_384)); - ZBGT_PARALLEL_HATCHES[3] = registerMetaTileEntity(18013, new MetaTileEntityLargeParallelHatch( - zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.OpV])), GTValues.UXV, 65_536)); - ZBGT_PARALLEL_HATCHES[4] = registerMetaTileEntity(18014, new MetaTileEntityLargeParallelHatch( - zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.MAX])), GTValues.OpV, 262_144)); - ZBGT_PARALLEL_HATCHES[5] = registerMetaTileEntity(18015, new MetaTileEntityLargeParallelHatch( - zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.MAX]) + ".1"), GTValues.MAX, - 1_048_576)); - ZBGT_PARALLEL_HATCHES[6] = registerMetaTileEntity(18016, new MetaTileEntityLargeParallelHatch( - zbgtId("parallel_hatch.final"), GTValues.MAX, Integer.MAX_VALUE)); - } + ZBGT_PARALLEL_HATCHES[0] = registerMetaTileEntity(18010, new MetaTileEntityLargeParallelHatch( + zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.UEV])), GTValues.UHV, 1024)); + ZBGT_PARALLEL_HATCHES[1] = registerMetaTileEntity(18011, new MetaTileEntityLargeParallelHatch( + zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.UIV])), GTValues.UEV, 4096)); + ZBGT_PARALLEL_HATCHES[2] = registerMetaTileEntity(18012, new MetaTileEntityLargeParallelHatch( + zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.UXV])), GTValues.UIV, 16_384)); + ZBGT_PARALLEL_HATCHES[3] = registerMetaTileEntity(18013, new MetaTileEntityLargeParallelHatch( + zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.OpV])), GTValues.UXV, 65_536)); + ZBGT_PARALLEL_HATCHES[4] = registerMetaTileEntity(18014, new MetaTileEntityLargeParallelHatch( + zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.MAX])), GTValues.OpV, 262_144)); + ZBGT_PARALLEL_HATCHES[5] = registerMetaTileEntity(18015, new MetaTileEntityLargeParallelHatch( + zbgtId(String.format("parallel_hatch.%s", GTValues.VN[GTValues.MAX]) + ".1"), GTValues.MAX, + 1_048_576)); + ZBGT_PARALLEL_HATCHES[6] = registerMetaTileEntity(18016, new MetaTileEntityLargeParallelHatch( + zbgtId("parallel_hatch.final"), GTValues.MAX, Integer.MAX_VALUE)); // 18050-18099 (50) reserved for multiblocks - if (ZBGTMods.GCYM.isModLoaded()) { - MEGA_EBF = registerMetaTileEntity(18050, - new MetaTileEntityMegaEBF(zbgtId("mega_ebf"))); + MEGA_EBF = registerMetaTileEntity(18050, + new MetaTileEntityMegaEBF(zbgtId("mega_ebf"))); - MEGA_LCR = registerMetaTileEntity(18051, - new MetaTileEntityMegaLCR(zbgtId("mega_lcr"))); + MEGA_LCR = registerMetaTileEntity(18051, + new MetaTileEntityMegaLCR(zbgtId("mega_lcr"))); - MEGA_VF = registerMetaTileEntity(18052, - new MetaTileEntityMegaVF(zbgtId("mega_vf"))); + MEGA_VF = registerMetaTileEntity(18052, + new MetaTileEntityMegaVF(zbgtId("mega_vf"))); - MEGA_OCU = registerMetaTileEntity(18053, - new MetaTileEntityMegaOCU(zbgtId("mega_ocu"))); + MEGA_OCU = registerMetaTileEntity(18053, + new MetaTileEntityMegaOCU(zbgtId("mega_ocu"))); - MEGA_ABS = registerMetaTileEntity(18054, - new MetaTileEntityMegaABS(zbgtId("mega_abs"))); + MEGA_ABS = registerMetaTileEntity(18054, + new MetaTileEntityMegaABS(zbgtId("mega_abs"))); - PRASS = registerMetaTileEntity(18055, - new MetaTileEntityPreciseAssembler(zbgtId("precise_assembler"))); - } + PRASS = registerMetaTileEntity(18055, + new MetaTileEntityPreciseAssembler(zbgtId("precise_assembler"))); CoAL = registerMetaTileEntity(18056, new MetaTileEntityCoAL(zbgtId("coal"))); diff --git a/src/main/java/com/zorbatron/zbgt/materials/ZBGTMaterialOverrides.java b/src/main/java/com/zorbatron/zbgt/materials/ZBGTMaterialOverrides.java index 2f810f68..a71af4f8 100644 --- a/src/main/java/com/zorbatron/zbgt/materials/ZBGTMaterialOverrides.java +++ b/src/main/java/com/zorbatron/zbgt/materials/ZBGTMaterialOverrides.java @@ -1,7 +1,5 @@ package com.zorbatron.zbgt.materials; -import com.zorbatron.zbgt.api.util.ZBGTMods; - import gregtech.api.unification.material.Material; import gregtech.api.unification.material.info.MaterialFlag; @@ -9,10 +7,7 @@ public class ZBGTMaterialOverrides { public static void init() { NormalGT.init(); - - if (ZBGTMods.GCYM.isModLoaded()) { - GCYM.init(); - } + GCYM.init(); } protected static void setFlags(Material[] materials, MaterialFlag... flags) { diff --git a/src/main/java/com/zorbatron/zbgt/recipe/MultiblockPartRecipes.java b/src/main/java/com/zorbatron/zbgt/recipe/MultiblockPartRecipes.java index eea4a92c..f350685b 100644 --- a/src/main/java/com/zorbatron/zbgt/recipe/MultiblockPartRecipes.java +++ b/src/main/java/com/zorbatron/zbgt/recipe/MultiblockPartRecipes.java @@ -3,9 +3,7 @@ import static gregtech.api.GTValues.*; import static gregtech.api.recipes.RecipeMaps.ASSEMBLER_RECIPES; -import com.zorbatron.zbgt.ZBGTConfig; import com.zorbatron.zbgt.api.recipes.ZBGTRecipeMaps; -import com.zorbatron.zbgt.api.util.ZBGTMods; import com.zorbatron.zbgt.common.ZBGTMetaTileEntities; import com.zorbatron.zbgt.recipe.helpers.RecipeAssists; @@ -19,10 +17,7 @@ public class MultiblockPartRecipes { protected static void init() { misc(); - - if (ZBGTMods.GCYM.isModLoaded() && ZBGTConfig.recipeSettings.enableParallelHatchRecipes) { - largeParallelHatches(); - } + largeParallelHatches(); } private static void misc() {