diff --git a/src/main/java/gregtech/GregTechMod.java b/src/main/java/gregtech/GregTechMod.java index fee0d231507..0671ae7cacb 100644 --- a/src/main/java/gregtech/GregTechMod.java +++ b/src/main/java/gregtech/GregTechMod.java @@ -38,7 +38,6 @@ import gregtech.common.items.MetaItems; import gregtech.common.metatileentities.MetaTileEntities; import gregtech.common.worldgen.LootTableHelper; -import gregtech.integration.jei.recipe.primitive.OreByProduct; import gregtech.integration.theoneprobe.TheOneProbeCompatibility; import gregtech.loaders.dungeon.DungeonLootLoader; import net.minecraft.block.state.IBlockState; @@ -139,6 +138,7 @@ public void onPreInit(FMLPreInitializationEvent event) { /* Start Heating Coil Registration */ for (BlockWireCoil.CoilType type : BlockWireCoil.CoilType.values()) { HEATING_COILS.put(MetaBlocks.WIRE_COIL.getState(type), type); + HEATING_COILS.put(MetaBlocks.WIRE_COIL.getState(type, true), type); } /* End Heating Coil Registration */ diff --git a/src/main/java/gregtech/api/pattern/TraceabilityPredicate.java b/src/main/java/gregtech/api/pattern/TraceabilityPredicate.java index 81c3e49d85a..de31436ee27 100644 --- a/src/main/java/gregtech/api/pattern/TraceabilityPredicate.java +++ b/src/main/java/gregtech/api/pattern/TraceabilityPredicate.java @@ -2,6 +2,7 @@ import gregtech.api.GregTechAPI; import gregtech.api.block.IHeatingCoilBlockStats; +import gregtech.api.block.VariantActiveBlock; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; import gregtech.api.metatileentity.multiblock.MultiblockControllerBase; @@ -40,7 +41,18 @@ public class TraceabilityPredicate { return true; } return false; - }, () -> GregTechAPI.HEATING_COILS.keySet().stream().map(key -> new BlockInfo(key, null)).toArray(BlockInfo[]::new)) + }, () -> GregTechAPI.HEATING_COILS.entrySet().stream() + .filter(entry -> { + // do not include the active versions of blocks in jei to prevent "duplicates" + if (entry.getKey().getPropertyKeys().contains(VariantActiveBlock.ACTIVE)) { + return !entry.getKey().getValue(VariantActiveBlock.ACTIVE); + } + return true; + }) + // sort to make autogenerated jei previews not pick random coils each game load + .sorted(Comparator.comparingInt(entry -> entry.getValue().getTier())) + .map(entry -> new BlockInfo(entry.getKey(), null)) + .toArray(BlockInfo[]::new)) .addTooltips("gregtech.multiblock.pattern.error.coils"); public final List common = new ArrayList<>(); diff --git a/src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityElectricBlastFurnace.java b/src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityElectricBlastFurnace.java index bb01fb36f28..46c08315f51 100644 --- a/src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityElectricBlastFurnace.java @@ -3,6 +3,7 @@ import gregtech.api.GTValues; import gregtech.api.GregTechAPI; import gregtech.api.block.IHeatingCoilBlockStats; +import gregtech.api.block.VariantActiveBlock; import gregtech.api.capability.IHeatingCoil; import gregtech.api.capability.impl.HeatingCoilRecipeLogic; import gregtech.api.metatileentity.MetaTileEntity; @@ -161,6 +162,12 @@ public List getMatchingShapes() { .where('H', MetaTileEntities.MUFFLER_HATCH[GTValues.LV], EnumFacing.UP) .where('M', () -> ConfigHolder.machines.enableMaintenance ? MetaTileEntities.MAINTENANCE_HATCH : MetaBlocks.METAL_CASING.getState(MetalCasingType.INVAR_HEATPROOF), EnumFacing.NORTH); GregTechAPI.HEATING_COILS.entrySet().stream() + .filter(entry -> { + if (entry.getKey().getPropertyKeys().contains(VariantActiveBlock.ACTIVE)) { + return !entry.getKey().getValue(VariantActiveBlock.ACTIVE); + } + return true; + }) .sorted(Comparator.comparingInt(entry -> entry.getValue().getTier())) .forEach(entry -> shapeInfo.add(builder.where('C', entry.getKey()).build())); return shapeInfo;