Skip to content

Commit

Permalink
Eek! (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorbatron authored Sep 12, 2024
1 parent c72b003 commit f407083
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 53 deletions.
4 changes: 3 additions & 1 deletion src/main/java/com/zorbatron/zbgt/ZBGTCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
59 changes: 27 additions & 32 deletions src/main/java/com/zorbatron/zbgt/common/ZBGTMetaTileEntities.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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")));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
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;

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

Expand All @@ -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() {
Expand Down

0 comments on commit f407083

Please sign in to comment.