From 0dd89e53398a474b5705490457612b129b152cd2 Mon Sep 17 00:00:00 2001 From: YoungOnion <39562198+youngonionmc@users.noreply.github.com> Date: Sat, 4 Jan 2025 04:45:11 -0500 Subject: [PATCH 1/2] Crafting Component Refactor (#2652) --- .../com/gregtechceu/gtceu/api/GTValues.java | 8 - .../gtceu/common/data/GTRecipes.java | 15 + .../gtceu/data/recipe/CraftingComponent.java | 982 +----------------- .../data/recipe/GTCraftingComponents.java | 768 ++++++++++++++ .../generated/MaterialRecipeHandler.java | 4 +- .../recipe/misc/MetaTileEntityLoader.java | 50 +- .../MetaTileEntityMachineRecipeLoader.java | 79 +- .../alloyblast/AlloyBlastRecipeProducer.java | 4 +- .../integration/kjs/GregTechKubeJSPlugin.java | 2 + .../kjs/events/CraftingComponentsEventJS.java | 128 ++- 10 files changed, 953 insertions(+), 1087 deletions(-) create mode 100644 src/main/java/com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java diff --git a/src/main/java/com/gregtechceu/gtceu/api/GTValues.java b/src/main/java/com/gregtechceu/gtceu/api/GTValues.java index 94e91980f8..eede6c8a50 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/GTValues.java +++ b/src/main/java/com/gregtechceu/gtceu/api/GTValues.java @@ -1,7 +1,5 @@ package com.gregtechceu.gtceu.api; -import com.gregtechceu.gtceu.data.recipe.CraftingComponent; - import net.minecraft.util.RandomSource; import java.time.LocalDate; @@ -15,12 +13,6 @@ */ public class GTValues { - /** - * Default fallback value used for Map keys. - * Currently only used in {@link CraftingComponent}. - */ - public static final int FALLBACK = -1; - /** *

* This is worth exactly one normal Item. diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipes.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipes.java index f914450666..ea1c460b85 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipes.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipes.java @@ -1,6 +1,8 @@ package com.gregtechceu.gtceu.common.data; import com.gregtechceu.gtceu.api.addon.AddonFinder; +import com.gregtechceu.gtceu.api.data.chemical.material.properties.BlastProperty; +import com.gregtechceu.gtceu.api.recipe.ingredient.FluidIngredient; import com.gregtechceu.gtceu.data.recipe.MaterialInfoLoader; import com.gregtechceu.gtceu.data.recipe.configurable.RecipeAddition; import com.gregtechceu.gtceu.data.recipe.configurable.RecipeRemoval; @@ -14,11 +16,24 @@ import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +import java.util.EnumMap; +import java.util.Map; import java.util.Set; import java.util.function.Consumer; public class GTRecipes { + public static final Map EBF_GASES = new EnumMap<>( + BlastProperty.GasTier.class); + + static { + EBF_GASES.put(BlastProperty.GasTier.LOW, FluidIngredient.of(GTMaterials.Nitrogen.getFluidTag(), 1000)); + EBF_GASES.put(BlastProperty.GasTier.MID, FluidIngredient.of(GTMaterials.Helium.getFluidTag(), 100)); + EBF_GASES.put(BlastProperty.GasTier.HIGH, FluidIngredient.of(GTMaterials.Argon.getFluidTag(), 50)); + EBF_GASES.put(BlastProperty.GasTier.HIGHER, FluidIngredient.of(GTMaterials.Neon.getFluidTag(), 25)); + EBF_GASES.put(BlastProperty.GasTier.HIGHEST, FluidIngredient.of(GTMaterials.Krypton.getFluidTag(), 10)); + } + public static final Set RECIPE_FILTERS = new ObjectOpenHashSet<>(); /* diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/CraftingComponent.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/CraftingComponent.java index 4226b6294f..441422f279 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/CraftingComponent.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/CraftingComponent.java @@ -1,971 +1,53 @@ package com.gregtechceu.gtceu.data.recipe; -import com.gregtechceu.gtceu.GTCEu; -import com.gregtechceu.gtceu.api.GTCEuAPI; -import com.gregtechceu.gtceu.api.GTValues; -import com.gregtechceu.gtceu.api.data.chemical.material.properties.BlastProperty; import com.gregtechceu.gtceu.api.data.chemical.material.stack.UnificationEntry; -import com.gregtechceu.gtceu.api.data.tag.TagPrefix; -import com.gregtechceu.gtceu.api.recipe.ingredient.FluidIngredient; -import com.gregtechceu.gtceu.common.data.GTBlocks; -import com.gregtechceu.gtceu.common.data.GTItems; -import com.gregtechceu.gtceu.common.data.GTMachines; -import com.gregtechceu.gtceu.common.data.GTMaterials; -import com.gregtechceu.gtceu.data.recipe.event.CraftingComponentModificationEvent; -import com.gregtechceu.gtceu.integration.kjs.GTCEuStartupEvents; -import com.gregtechceu.gtceu.integration.kjs.events.CraftingComponentsEventJS; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.tags.TagKey; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.block.Blocks; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.Tags; -import java.util.EnumMap; -import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.Stream; +import lombok.Setter; +import org.jetbrains.annotations.NotNull; -import static com.gregtechceu.gtceu.api.GTValues.*; +import static com.gregtechceu.gtceu.api.GTValues.V; public class CraftingComponent { - public static Component CIRCUIT; - public static Component BETTER_CIRCUIT; - public static Component PUMP; - public static Component WIRE_ELECTRIC; - public static Component WIRE_QUAD; - public static Component WIRE_OCT; - public static Component WIRE_HEX; - public static Component CABLE; - public static Component CABLE_DOUBLE; - public static Component CABLE_QUAD; - public static Component CABLE_OCT; - public static Component CABLE_HEX; - public static Component CABLE_TIER_UP; - public static Component CABLE_TIER_UP_DOUBLE; - public static Component CABLE_TIER_UP_QUAD; - public static Component CABLE_TIER_UP_OCT; - public static Component CABLE_TIER_UP_HEX; - public static Component CASING; - public static Component HULL; - public static Component PIPE_NORMAL; - public static Component PIPE_LARGE; - public static Component PIPE_NONUPLE; - public static Component GLASS; - public static Component PLATE; - public static Component HULL_PLATE; - public static Component MOTOR; - public static Component ROTOR; - public static Component SENSOR; - public static Component GRINDER; - public static Component SAWBLADE; - public static Component DIAMOND; - public static Component PISTON; - public static Component EMITTER; - public static Component CONVEYOR; - public static Component ROBOT_ARM; - public static Component COIL_HEATING; - public static Component COIL_HEATING_DOUBLE; - public static Component COIL_ELECTRIC; - public static Component STICK_MAGNETIC; - public static Component STICK_DISTILLATION; - public static Component FIELD_GENERATOR; - public static Component STICK_ELECTROMAGNETIC; - public static Component STICK_RADIOACTIVE; - public static Component PIPE_REACTOR; - public static Component POWER_COMPONENT; - public static Component VOLTAGE_COIL; - public static Component SPRING; - public static Component CRATE; - public static Component DRUM; - public static Component FRAME; + private final Object[] values = new Object[V.length]; + @Setter + private @NotNull Object fallback; - public static final Map EBF_GASES = new EnumMap<>( - BlastProperty.GasTier.class); - - static { - EBF_GASES.put(BlastProperty.GasTier.LOW, FluidIngredient.of(1000, GTMaterials.Nitrogen.getFluid())); - EBF_GASES.put(BlastProperty.GasTier.MID, FluidIngredient.of(100, GTMaterials.Helium.getFluid())); - EBF_GASES.put(BlastProperty.GasTier.HIGH, FluidIngredient.of(50, GTMaterials.Argon.getFluid())); - EBF_GASES.put(BlastProperty.GasTier.HIGHER, FluidIngredient.of(25, GTMaterials.Neon.getFluid())); - EBF_GASES.put(BlastProperty.GasTier.HIGHEST, FluidIngredient.of(10, GTMaterials.Krypton.getFluid())); + public CraftingComponent(@NotNull Object fallback) { + checkType(fallback); + this.fallback = fallback; } - public static void initializeComponents() { - /* - * GTCEu must supply values for at least tiers 1 through 8 (through UV) - */ - CIRCUIT = new Component(Stream.of(new Object[][] { - - { 0, CustomTags.ULV_CIRCUITS }, - { 1, CustomTags.LV_CIRCUITS }, - { 2, CustomTags.MV_CIRCUITS }, - { 3, CustomTags.HV_CIRCUITS }, - { 4, CustomTags.EV_CIRCUITS }, - { 5, CustomTags.IV_CIRCUITS }, - { 6, CustomTags.LuV_CIRCUITS }, - { 7, CustomTags.ZPM_CIRCUITS }, - { 8, CustomTags.UV_CIRCUITS }, - { 9, CustomTags.UHV_CIRCUITS }, - { 10, CustomTags.UEV_CIRCUITS }, - { 11, CustomTags.UIV_CIRCUITS }, - { 12, CustomTags.UXV_CIRCUITS }, - { 13, CustomTags.OpV_CIRCUITS }, - { 14, CustomTags.MAX_CIRCUITS }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - BETTER_CIRCUIT = new Component(Stream.of(new Object[][] { - - { 0, CustomTags.LV_CIRCUITS }, - { 1, CustomTags.MV_CIRCUITS }, - { 2, CustomTags.HV_CIRCUITS }, - { 3, CustomTags.EV_CIRCUITS }, - { 4, CustomTags.IV_CIRCUITS }, - { 5, CustomTags.LuV_CIRCUITS }, - { 6, CustomTags.ZPM_CIRCUITS }, - { 7, CustomTags.UV_CIRCUITS }, - { 8, CustomTags.UHV_CIRCUITS }, - { 10, CustomTags.UEV_CIRCUITS }, - { 11, CustomTags.UIV_CIRCUITS }, - { 12, CustomTags.UXV_CIRCUITS }, - { 13, CustomTags.OpV_CIRCUITS }, - { 14, CustomTags.MAX_CIRCUITS }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - PUMP = new Component(Stream.of(new Object[][] { - - { 1, GTItems.ELECTRIC_PUMP_LV.asStack() }, - { 2, GTItems.ELECTRIC_PUMP_MV.asStack() }, - { 3, GTItems.ELECTRIC_PUMP_HV.asStack() }, - { 4, GTItems.ELECTRIC_PUMP_EV.asStack() }, - { 5, GTItems.ELECTRIC_PUMP_IV.asStack() }, - { 6, GTItems.ELECTRIC_PUMP_LuV.asStack() }, - { 7, GTItems.ELECTRIC_PUMP_ZPM.asStack() }, - { 8, GTItems.ELECTRIC_PUMP_UV.asStack() }, - { FALLBACK, GTItems.ELECTRIC_PUMP_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - PUMP.appendIngredients(Stream.of(new Object[][] { - { 9, GTItems.ELECTRIC_PUMP_UHV.asStack() }, - { 10, GTItems.ELECTRIC_PUMP_UEV.asStack() }, - { 11, GTItems.ELECTRIC_PUMP_UIV.asStack() }, - { 12, GTItems.ELECTRIC_PUMP_UXV.asStack() }, - { 13, GTItems.ELECTRIC_PUMP_OpV.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - WIRE_ELECTRIC = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Gold) }, - { 1, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Gold) }, - { 2, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Silver) }, - { 3, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Electrum) }, - { 4, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Platinum) }, - { 5, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium) }, - { 6, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium) }, - { 7, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium) }, - { 8, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium) }, - { 9, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - WIRE_QUAD = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Lead) }, - { 1, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Tungsten) }, - { 6, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - WIRE_OCT = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Lead) }, - { 1, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Tungsten) }, - { 6, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - WIRE_HEX = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Lead) }, - { 1, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Tungsten) }, - { 6, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.RedAlloy) }, - { 1, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Platinum) }, - { 6, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_DOUBLE = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.RedAlloy) }, - { 1, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Platinum) }, - { 6, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_QUAD = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.RedAlloy) }, - { 1, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Platinum) }, - { 6, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_OCT = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.RedAlloy) }, - { 1, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Platinum) }, - { 6, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_HEX = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.RedAlloy) }, - { 1, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Platinum) }, - { 6, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_TIER_UP = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Tin) }, - { 1, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Copper) }, - { 2, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Gold) }, - { 3, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Aluminium) }, - { 4, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Platinum) }, - { 5, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.NiobiumTitanium) }, - { 6, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.VanadiumGallium) }, - { 7, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.YttriumBariumCuprate) }, - { 8, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_TIER_UP_DOUBLE = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Tin) }, - { 1, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Copper) }, - { 2, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Gold) }, - { 3, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Aluminium) }, - { 4, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Platinum) }, - { 5, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.NiobiumTitanium) }, - { 6, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.VanadiumGallium) }, - { 7, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.YttriumBariumCuprate) }, - { 8, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_TIER_UP_QUAD = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Tin) }, - { 1, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Copper) }, - { 2, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Gold) }, - { 3, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Aluminium) }, - { 4, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Platinum) }, - { 5, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.NiobiumTitanium) }, - { 6, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.VanadiumGallium) }, - { 7, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.YttriumBariumCuprate) }, - { 8, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_TIER_UP_OCT = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Tin) }, - { 1, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Copper) }, - { 2, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Gold) }, - { 3, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Aluminium) }, - { 4, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Platinum) }, - { 5, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.NiobiumTitanium) }, - { 6, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.VanadiumGallium) }, - { 7, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.YttriumBariumCuprate) }, - { 8, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CABLE_TIER_UP_HEX = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Tin) }, - { 1, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Copper) }, - { 2, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Gold) }, - { 3, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Aluminium) }, - { 4, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Platinum) }, - { 5, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.NiobiumTitanium) }, - { 6, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.VanadiumGallium) }, - { 7, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.YttriumBariumCuprate) }, - { 8, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Europium) }, - { FALLBACK, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - HULL = new Component(Stream.of(new Object[][] { - - { 0, GTMachines.HULL[0].asStack() }, - { 1, GTMachines.HULL[1].asStack() }, - { 2, GTMachines.HULL[2].asStack() }, - { 3, GTMachines.HULL[3].asStack() }, - { 4, GTMachines.HULL[4].asStack() }, - { 5, GTMachines.HULL[5].asStack() }, - { 6, GTMachines.HULL[6].asStack() }, - { 7, GTMachines.HULL[7].asStack() }, - { 8, GTMachines.HULL[8].asStack() }, - { 9, GTMachines.HULL[9].asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - HULL.appendIngredients(Stream.of(new Object[][] { - { 10, GTMachines.HULL[10].asStack() }, - { 11, GTMachines.HULL[11].asStack() }, - { 12, GTMachines.HULL[12].asStack() }, - { 13, GTMachines.HULL[13].asStack() }, - { 14, GTMachines.HULL[14].asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - CASING = new Component(Stream.of(new Object[][] { - - { 0, GTBlocks.MACHINE_CASING_ULV.asStack() }, - { 1, GTBlocks.MACHINE_CASING_LV.asStack() }, - { 2, GTBlocks.MACHINE_CASING_MV.asStack() }, - { 3, GTBlocks.MACHINE_CASING_HV.asStack() }, - { 4, GTBlocks.MACHINE_CASING_EV.asStack() }, - { 5, GTBlocks.MACHINE_CASING_IV.asStack() }, - { 6, GTBlocks.MACHINE_CASING_LuV.asStack() }, - { 7, GTBlocks.MACHINE_CASING_ZPM.asStack() }, - { 8, GTBlocks.MACHINE_CASING_UV.asStack() }, - { 9, GTBlocks.MACHINE_CASING_UHV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - CASING.appendIngredients(Stream.of(new Object[][] { - { 10, GTBlocks.MACHINE_CASING_UEV.asStack() }, - { 11, GTBlocks.MACHINE_CASING_UIV.asStack() }, - { 12, GTBlocks.MACHINE_CASING_UXV.asStack() }, - { 13, GTBlocks.MACHINE_CASING_OpV.asStack() }, - { 14, GTBlocks.MACHINE_CASING_MAX.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - PIPE_NORMAL = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Bronze) }, - { 1, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Bronze) }, - { 2, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Steel) }, - { 3, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.StainlessSteel) }, - { 4, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Titanium) }, - { 5, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.TungstenSteel) }, - { 6, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Iridium) }, - { 8, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Naquadah) }, - { FALLBACK, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Naquadah) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - PIPE_LARGE = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Bronze) }, - { 1, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Bronze) }, - { 2, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Steel) }, - { 3, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.StainlessSteel) }, - { 4, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Titanium) }, - { 5, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.TungstenSteel) }, - { 6, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Ultimet) }, - { 8, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Naquadah) }, - { FALLBACK, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Neutronium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - PIPE_NONUPLE = new Component(Stream.of(new Object[][] { - - { 4, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Titanium) }, - { 5, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.TungstenSteel) }, - { 6, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Iridium) }, - { 8, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Naquadah) }, - { GTValues.FALLBACK, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Neutronium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - /* - * Glass: Steam-MV - * Tempered: HV, EV - * Laminated Glass: IV, LuV - * Fusion: ZPM, UV - */ - GLASS = new Component(Stream.of(new Object[][] { - - { GTValues.FALLBACK, Tags.Items.GLASS }, - { ULV, Tags.Items.GLASS }, - { LV, Tags.Items.GLASS }, - { MV, Tags.Items.GLASS }, - { HV, GTBlocks.CASING_TEMPERED_GLASS.asStack() }, - { EV, GTBlocks.CASING_TEMPERED_GLASS.asStack() }, - { IV, GTBlocks.CASING_LAMINATED_GLASS.asStack() }, - { LuV, GTBlocks.CASING_LAMINATED_GLASS.asStack() }, - { ZPM, GTBlocks.FUSION_GLASS.asStack() }, - { UV, GTBlocks.FUSION_GLASS.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - PLATE = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.plate, GTMaterials.WroughtIron) }, - { 1, new UnificationEntry(TagPrefix.plate, GTMaterials.Steel) }, - { 2, new UnificationEntry(TagPrefix.plate, GTMaterials.Aluminium) }, - { 3, new UnificationEntry(TagPrefix.plate, GTMaterials.StainlessSteel) }, - { 4, new UnificationEntry(TagPrefix.plate, GTMaterials.Titanium) }, - { 5, new UnificationEntry(TagPrefix.plate, GTMaterials.TungstenSteel) }, - { 6, new UnificationEntry(TagPrefix.plate, GTMaterials.RhodiumPlatedPalladium) }, - { 7, new UnificationEntry(TagPrefix.plate, GTMaterials.NaquadahAlloy) }, - { 8, new UnificationEntry(TagPrefix.plate, GTMaterials.Darmstadtium) }, - { 9, new UnificationEntry(TagPrefix.plate, GTMaterials.Neutronium) }, - { FALLBACK, new UnificationEntry(TagPrefix.plate, GTMaterials.Neutronium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - HULL_PLATE = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.plate, GTMaterials.Wood) }, - { 1, new UnificationEntry(TagPrefix.plate, GTMaterials.WroughtIron) }, - { 2, new UnificationEntry(TagPrefix.plate, GTMaterials.WroughtIron) }, - { 3, new UnificationEntry(TagPrefix.plate, GTMaterials.Polyethylene) }, - { 4, new UnificationEntry(TagPrefix.plate, GTMaterials.Polyethylene) }, - { 5, new UnificationEntry(TagPrefix.plate, GTMaterials.Polytetrafluoroethylene) }, - { 6, new UnificationEntry(TagPrefix.plate, GTMaterials.Polytetrafluoroethylene) }, - { 7, new UnificationEntry(TagPrefix.plate, GTMaterials.Polybenzimidazole) }, - { 8, new UnificationEntry(TagPrefix.plate, GTMaterials.Polybenzimidazole) }, - { GTValues.FALLBACK, new UnificationEntry(TagPrefix.plate, GTMaterials.Polybenzimidazole) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - MOTOR = new Component(Stream.of(new Object[][] { - - { 1, GTItems.ELECTRIC_MOTOR_LV.asStack() }, - { 2, GTItems.ELECTRIC_MOTOR_MV.asStack() }, - { 3, GTItems.ELECTRIC_MOTOR_HV.asStack() }, - { 4, GTItems.ELECTRIC_MOTOR_EV.asStack() }, - { 5, GTItems.ELECTRIC_MOTOR_IV.asStack() }, - { 6, GTItems.ELECTRIC_MOTOR_LuV.asStack() }, - { 7, GTItems.ELECTRIC_MOTOR_ZPM.asStack() }, - { 8, GTItems.ELECTRIC_MOTOR_UV.asStack() }, - { FALLBACK, GTItems.ELECTRIC_MOTOR_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - MOTOR.appendIngredients(Stream.of(new Object[][] { - { 9, GTItems.ELECTRIC_MOTOR_UHV.asStack() }, - { 10, GTItems.ELECTRIC_MOTOR_UEV.asStack() }, - { 11, GTItems.ELECTRIC_MOTOR_UIV.asStack() }, - { 12, GTItems.ELECTRIC_MOTOR_UXV.asStack() }, - { 13, GTItems.ELECTRIC_MOTOR_OpV.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - ROTOR = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.rotor, GTMaterials.Tin) }, - { 1, new UnificationEntry(TagPrefix.rotor, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.rotor, GTMaterials.Bronze) }, - { 3, new UnificationEntry(TagPrefix.rotor, GTMaterials.Steel) }, - { 4, new UnificationEntry(TagPrefix.rotor, GTMaterials.StainlessSteel) }, - { 5, new UnificationEntry(TagPrefix.rotor, GTMaterials.TungstenSteel) }, - { 6, new UnificationEntry(TagPrefix.rotor, GTMaterials.RhodiumPlatedPalladium) }, - { 7, new UnificationEntry(TagPrefix.rotor, GTMaterials.NaquadahAlloy) }, - { 8, new UnificationEntry(TagPrefix.rotor, GTMaterials.Darmstadtium) }, - { FALLBACK, new UnificationEntry(TagPrefix.rotor, GTMaterials.Darmstadtium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - SENSOR = new Component(Stream.of(new Object[][] { - - { 1, GTItems.SENSOR_LV.asStack() }, - { 2, GTItems.SENSOR_MV.asStack() }, - { 3, GTItems.SENSOR_HV.asStack() }, - { 4, GTItems.SENSOR_EV.asStack() }, - { 5, GTItems.SENSOR_IV.asStack() }, - { 6, GTItems.SENSOR_LuV.asStack() }, - { 7, GTItems.SENSOR_ZPM.asStack() }, - { 8, GTItems.SENSOR_UV.asStack() }, - { FALLBACK, GTItems.SENSOR_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - SENSOR.appendIngredients(Stream.of(new Object[][] { - { 9, GTItems.SENSOR_UHV.asStack() }, - { 10, GTItems.SENSOR_UEV.asStack() }, - { 11, GTItems.SENSOR_UIV.asStack() }, - { 12, GTItems.SENSOR_UXV.asStack() }, - { 13, GTItems.SENSOR_OpV.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - GRINDER = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond) }, - { 1, new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond) }, - { 2, new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond) }, - { 3, GTItems.COMPONENT_GRINDER_DIAMOND.asStack() }, - { 4, GTItems.COMPONENT_GRINDER_DIAMOND.asStack() }, - { 5, GTItems.COMPONENT_GRINDER_TUNGSTEN.asStack() }, - { GTValues.FALLBACK, GTItems.COMPONENT_GRINDER_TUNGSTEN.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - SAWBLADE = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Bronze) }, - { 1, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.CobaltBrass) }, - { 2, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.VanadiumSteel) }, - { 3, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.RedSteel) }, - { 4, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Ultimet) }, - { 5, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.TungstenCarbide) }, - { 6, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.HSSE) }, - { 7, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.NaquadahAlloy) }, - { 8, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Duranium) }, - { GTValues.FALLBACK, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Duranium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - DIAMOND = new Component(Stream.of(new Object[][] { - - { GTValues.FALLBACK, new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - PISTON = new Component(Stream.of(new Object[][] { - - { 1, GTItems.ELECTRIC_PISTON_LV.asStack() }, - { 2, GTItems.ELECTRIC_PISTON_MV.asStack() }, - { 3, GTItems.ELECTRIC_PISTON_HV.asStack() }, - { 4, GTItems.ELECTRIC_PISTON_EV.asStack() }, - { 5, GTItems.ELECTRIC_PISTON_IV.asStack() }, - { 6, GTItems.ELECTRIC_PISTON_LuV.asStack() }, - { 7, GTItems.ELECTRIC_PISTON_ZPM.asStack() }, - { 8, GTItems.ELECTRIC_PISTON_UV.asStack() }, - { FALLBACK, GTItems.ELECTRIC_PISTON_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - PISTON.appendIngredients(Stream.of(new Object[][] { - { 9, GTItems.ELECTRIC_PISTON_UHV.asStack() }, - { 10, GTItems.ELECTRIC_PISTON_UEV.asStack() }, - { 11, GTItems.ELECTRIC_PISTON_UIV.asStack() }, - { 12, GTItems.ELECTRIC_PISTON_UXV.asStack() }, - { 13, GTItems.ELECTRIC_PISTON_OpV.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - EMITTER = new Component(Stream.of(new Object[][] { - - { 1, GTItems.EMITTER_LV.asStack() }, - { 2, GTItems.EMITTER_MV.asStack() }, - { 3, GTItems.EMITTER_HV.asStack() }, - { 4, GTItems.EMITTER_EV.asStack() }, - { 5, GTItems.EMITTER_IV.asStack() }, - { 6, GTItems.EMITTER_LuV.asStack() }, - { 7, GTItems.EMITTER_ZPM.asStack() }, - { 8, GTItems.EMITTER_UV.asStack() }, - { FALLBACK, GTItems.EMITTER_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - EMITTER.appendIngredients(Stream.of(new Object[][] { - { 9, GTItems.EMITTER_UHV.asStack() }, - { 10, GTItems.EMITTER_UEV.asStack() }, - { 11, GTItems.EMITTER_UIV.asStack() }, - { 12, GTItems.EMITTER_UXV.asStack() }, - { 13, GTItems.EMITTER_OpV.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - CONVEYOR = new Component(Stream.of(new Object[][] { - - { 1, GTItems.CONVEYOR_MODULE_LV.asStack() }, - { 2, GTItems.CONVEYOR_MODULE_MV.asStack() }, - { 3, GTItems.CONVEYOR_MODULE_HV.asStack() }, - { 4, GTItems.CONVEYOR_MODULE_EV.asStack() }, - { 5, GTItems.CONVEYOR_MODULE_IV.asStack() }, - { 6, GTItems.CONVEYOR_MODULE_LuV.asStack() }, - { 7, GTItems.CONVEYOR_MODULE_ZPM.asStack() }, - { 8, GTItems.CONVEYOR_MODULE_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - CONVEYOR.appendIngredients(Stream.of(new Object[][] { - { 9, GTItems.CONVEYOR_MODULE_UHV.asStack() }, - { 10, GTItems.CONVEYOR_MODULE_UEV.asStack() }, - { 11, GTItems.CONVEYOR_MODULE_UIV.asStack() }, - { 12, GTItems.CONVEYOR_MODULE_UXV.asStack() }, - { 13, GTItems.CONVEYOR_MODULE_OpV.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - ROBOT_ARM = new Component(Stream.of(new Object[][] { - - { 1, GTItems.ROBOT_ARM_LV.asStack() }, - { 2, GTItems.ROBOT_ARM_MV.asStack() }, - { 3, GTItems.ROBOT_ARM_HV.asStack() }, - { 4, GTItems.ROBOT_ARM_EV.asStack() }, - { 5, GTItems.ROBOT_ARM_IV.asStack() }, - { 6, GTItems.ROBOT_ARM_LuV.asStack() }, - { 7, GTItems.ROBOT_ARM_ZPM.asStack() }, - { 8, GTItems.ROBOT_ARM_UV.asStack() }, - { FALLBACK, GTItems.ROBOT_ARM_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - ROBOT_ARM.appendIngredients(Stream.of(new Object[][] { - { 9, GTItems.ROBOT_ARM_UHV.asStack() }, - { 10, GTItems.ROBOT_ARM_UEV.asStack() }, - { 11, GTItems.ROBOT_ARM_UIV.asStack() }, - { 12, GTItems.ROBOT_ARM_UXV.asStack() }, - { 13, GTItems.ROBOT_ARM_OpV.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - COIL_HEATING = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Copper) }, - { 1, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Copper) }, - { 2, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Cupronickel) }, - { 3, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Kanthal) }, - { 4, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Nichrome) }, - { 5, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.RTMAlloy) }, - { 6, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.HSSG) }, - { 7, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Naquadah) }, - { 8, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.NaquadahAlloy) }, - { FALLBACK, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Trinium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - COIL_HEATING_DOUBLE = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Copper) }, - { 1, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Copper) }, - { 2, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Cupronickel) }, - { 3, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Kanthal) }, - { 4, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Nichrome) }, - { 5, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.RTMAlloy) }, - { 6, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.HSSG) }, - { 7, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Naquadah) }, - { 8, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.NaquadahAlloy) }, - { FALLBACK, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Trinium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - COIL_ELECTRIC = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Tin) }, - { 1, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Silver) }, - { 4, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Steel) }, - { 5, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Graphene) }, - { 6, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.NiobiumNitride) }, - { 7, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.YttriumBariumCuprate) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - STICK_MAGNETIC = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.rod, GTMaterials.IronMagnetic) }, - { 1, new UnificationEntry(TagPrefix.rod, GTMaterials.IronMagnetic) }, - { 2, new UnificationEntry(TagPrefix.rod, GTMaterials.SteelMagnetic) }, - { 3, new UnificationEntry(TagPrefix.rod, GTMaterials.SteelMagnetic) }, - { 4, new UnificationEntry(TagPrefix.rod, GTMaterials.NeodymiumMagnetic) }, - { 5, new UnificationEntry(TagPrefix.rod, GTMaterials.NeodymiumMagnetic) }, - { 6, new UnificationEntry(TagPrefix.rodLong, GTMaterials.NeodymiumMagnetic) }, - { 7, new UnificationEntry(TagPrefix.rodLong, GTMaterials.NeodymiumMagnetic) }, - { 8, new UnificationEntry(TagPrefix.block, GTMaterials.NeodymiumMagnetic) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - STICK_DISTILLATION = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.rod, GTMaterials.Blaze) }, - { 1, new UnificationEntry(TagPrefix.spring, GTMaterials.Copper) }, - { 2, new UnificationEntry(TagPrefix.spring, GTMaterials.Cupronickel) }, - { 3, new UnificationEntry(TagPrefix.spring, GTMaterials.Kanthal) }, - { 4, new UnificationEntry(TagPrefix.spring, GTMaterials.Nichrome) }, - { 5, new UnificationEntry(TagPrefix.spring, GTMaterials.RTMAlloy) }, - { 6, new UnificationEntry(TagPrefix.spring, GTMaterials.HSSG) }, - { 7, new UnificationEntry(TagPrefix.spring, GTMaterials.Naquadah) }, - { 8, new UnificationEntry(TagPrefix.spring, GTMaterials.NaquadahAlloy) }, - { GTValues.FALLBACK, new UnificationEntry(TagPrefix.rod, GTMaterials.Blaze) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - FIELD_GENERATOR = new Component(Stream.of(new Object[][] { - - { 1, GTItems.FIELD_GENERATOR_LV.asStack() }, - { 2, GTItems.FIELD_GENERATOR_MV.asStack() }, - { 3, GTItems.FIELD_GENERATOR_HV.asStack() }, - { 4, GTItems.FIELD_GENERATOR_EV.asStack() }, - { 5, GTItems.FIELD_GENERATOR_IV.asStack() }, - { 6, GTItems.FIELD_GENERATOR_LuV.asStack() }, - { 7, GTItems.FIELD_GENERATOR_ZPM.asStack() }, - { 8, GTItems.FIELD_GENERATOR_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - if (GTCEuAPI.isHighTier()) { - FIELD_GENERATOR.appendIngredients(Stream.of(new Object[][] { - { 9, GTItems.FIELD_GENERATOR_UHV.asStack() }, - { 10, GTItems.FIELD_GENERATOR_UEV.asStack() }, - { 11, GTItems.FIELD_GENERATOR_UIV.asStack() }, - { 12, GTItems.FIELD_GENERATOR_UXV.asStack() }, - { 13, GTItems.FIELD_GENERATOR_OpV.asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - } - - STICK_ELECTROMAGNETIC = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.rod, GTMaterials.Iron) }, - { 1, new UnificationEntry(TagPrefix.rod, GTMaterials.Iron) }, - { 2, new UnificationEntry(TagPrefix.rod, GTMaterials.Steel) }, - { 3, new UnificationEntry(TagPrefix.rod, GTMaterials.Steel) }, - { 4, new UnificationEntry(TagPrefix.rod, GTMaterials.Neodymium) }, - { GTValues.FALLBACK, new UnificationEntry(TagPrefix.rod, GTMaterials.VanadiumGallium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - STICK_RADIOACTIVE = new Component(Stream.of(new Object[][] { - - { 4, new UnificationEntry(TagPrefix.rod, GTMaterials.Uranium235) }, - { 5, new UnificationEntry(TagPrefix.rod, GTMaterials.Plutonium241) }, - { 6, new UnificationEntry(TagPrefix.rod, GTMaterials.NaquadahEnriched) }, - { 7, new UnificationEntry(TagPrefix.rod, GTMaterials.Americium) }, - { GTValues.FALLBACK, new UnificationEntry(TagPrefix.rod, GTMaterials.Tritanium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - PIPE_REACTOR = new Component(Stream.of(new Object[][] { - - { 0, new ItemStack(Blocks.GLASS, 1) }, - { 1, new ItemStack(Blocks.GLASS, 1) }, - { 2, new ItemStack(Blocks.GLASS, 1) }, - { 3, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Polyethylene) }, - { 4, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Polyethylene) }, - { 5, new UnificationEntry(TagPrefix.pipeHugeFluid, GTMaterials.Polyethylene) }, - { 6, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Polytetrafluoroethylene) }, - { 7, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Polytetrafluoroethylene) }, - { 8, new UnificationEntry(TagPrefix.pipeHugeFluid, GTMaterials.Polytetrafluoroethylene) }, - { GTValues.FALLBACK, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Polyethylene) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - POWER_COMPONENT = new Component(Stream.of(new Object[][] { - - { 2, GTItems.ULTRA_LOW_POWER_INTEGRATED_CIRCUIT.asStack() }, - { 3, GTItems.LOW_POWER_INTEGRATED_CIRCUIT.asStack() }, - { 4, GTItems.POWER_INTEGRATED_CIRCUIT.asStack() }, - { 5, GTItems.HIGH_POWER_INTEGRATED_CIRCUIT.asStack() }, - { 6, GTItems.HIGH_POWER_INTEGRATED_CIRCUIT.asStack() }, - { 7, GTItems.ULTRA_HIGH_POWER_INTEGRATED_CIRCUIT.asStack() }, - { 8, GTItems.ULTRA_HIGH_POWER_INTEGRATED_CIRCUIT.asStack() }, - { 9, GTItems.ULTRA_HIGH_POWER_INTEGRATED_CIRCUIT.asStack() }, - { GTValues.FALLBACK, GTItems.ULTRA_HIGH_POWER_INTEGRATED_CIRCUIT.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - VOLTAGE_COIL = new Component(Stream.of(new Object[][] { - - { 0, GTItems.VOLTAGE_COIL_ULV.asStack() }, - { 1, GTItems.VOLTAGE_COIL_LV.asStack() }, - { 2, GTItems.VOLTAGE_COIL_MV.asStack() }, - { 3, GTItems.VOLTAGE_COIL_HV.asStack() }, - { 4, GTItems.VOLTAGE_COIL_EV.asStack() }, - { 5, GTItems.VOLTAGE_COIL_IV.asStack() }, - { 6, GTItems.VOLTAGE_COIL_LuV.asStack() }, - { 7, GTItems.VOLTAGE_COIL_ZPM.asStack() }, - { 8, GTItems.VOLTAGE_COIL_UV.asStack() }, - { GTValues.FALLBACK, GTItems.VOLTAGE_COIL_UV.asStack() }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - SPRING = new Component(Stream.of(new Object[][] { - - { 0, new UnificationEntry(TagPrefix.spring, GTMaterials.Lead) }, - { 1, new UnificationEntry(TagPrefix.spring, GTMaterials.Tin) }, - { 2, new UnificationEntry(TagPrefix.spring, GTMaterials.Copper) }, - { 3, new UnificationEntry(TagPrefix.spring, GTMaterials.Gold) }, - { 4, new UnificationEntry(TagPrefix.spring, GTMaterials.Aluminium) }, - { 5, new UnificationEntry(TagPrefix.spring, GTMaterials.Tungsten) }, - { 6, new UnificationEntry(TagPrefix.spring, GTMaterials.NiobiumTitanium) }, - { 7, new UnificationEntry(TagPrefix.spring, GTMaterials.VanadiumGallium) }, - { 8, new UnificationEntry(TagPrefix.spring, GTMaterials.YttriumBariumCuprate) }, - { 9, new UnificationEntry(TagPrefix.spring, GTMaterials.Europium) }, - - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - CRATE = new Component(Stream.of(new Object[][] { - { 0, new ItemStack(Blocks.CHEST) }, - { 1, GTMachines.WOODEN_CRATE.asStack() }, - { 2, GTMachines.BRONZE_CRATE.asStack() }, - { 3, GTMachines.STEEL_CRATE.asStack() }, - { 4, GTMachines.ALUMINIUM_CRATE.asStack() }, - { 5, GTMachines.STAINLESS_STEEL_CRATE.asStack() }, - { 6, GTMachines.TITANIUM_CRATE.asStack() }, - { 7, GTMachines.TUNGSTENSTEEL_CRATE.asStack() }, - { 8, GTMachines.SUPER_CHEST[1].asStack() }, - { FALLBACK, GTMachines.SUPER_CHEST[1].asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - DRUM = new Component(Stream.of(new Object[][] { - { 0, new ItemStack(Blocks.GLASS) }, - { 1, GTMachines.WOODEN_DRUM.asStack() }, - { 2, GTMachines.BRONZE_DRUM.asStack() }, - { 3, GTMachines.STEEL_DRUM.asStack() }, - { 4, GTMachines.ALUMINIUM_DRUM.asStack() }, - { 5, GTMachines.STAINLESS_STEEL_DRUM.asStack() }, - { 6, GTMachines.TITANIUM_DRUM.asStack() }, - { 7, GTMachines.TUNGSTENSTEEL_DRUM.asStack() }, - { 8, GTMachines.SUPER_TANK[1].asStack() }, - { FALLBACK, GTMachines.SUPER_TANK[1].asStack() }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - FRAME = new Component(Stream.of(new Object[][] { - { 0, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Wood) }, - { 1, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Steel) }, - { 2, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Aluminium) }, - { 3, new UnificationEntry(TagPrefix.frameGt, GTMaterials.StainlessSteel) }, - { 4, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Titanium) }, - { 5, new UnificationEntry(TagPrefix.frameGt, GTMaterials.TungstenSteel) }, - { 6, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Ruridit) }, - { 7, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Iridium) }, - { 8, new UnificationEntry(TagPrefix.frameGt, GTMaterials.NaquadahAlloy) }, - { FALLBACK, new UnificationEntry(TagPrefix.frameGt, GTMaterials.NaquadahAlloy) }, - }).collect(Collectors.toMap(data -> (Integer) data[0], data -> data[1]))); - - MinecraftForge.EVENT_BUS.post(new CraftingComponentModificationEvent()); - if (GTCEu.Mods.isKubeJSLoaded()) { - KJSCallWrapper.craftingComponentModification(); - } + public @NotNull Object get(int tier) { + if (tier < 0 || tier >= values.length) + throw new IllegalArgumentException("Tier out of range of ULV-MAX, tier: " + tier); + var val = values[tier]; + return val == null ? fallback : val; } - public static class Component { - - private final Map ingredients; - - public Component(Map craftingComponents) { - ingredients = craftingComponents; - } - - public Object getIngredient(int tier) { - Object ingredient = ingredients.get(tier); - return ingredient == null ? ingredients.get(GTValues.FALLBACK) : ingredient; - } - - /** - * appendIngredients will add onto the default GTCEu map of Crafting Components with the - * ingredients that are passed into the method. If an Entry is passed in that overlaps - * with a default entry, the passed entry will override the default GTCEu entry. - *

- * An entry with the Key of "-1" will be the "fallback" value if no entry exists for the - * queried key. Any default value will be removed if ingredients are appended - * via this method. - * - * @param newIngredients Map of to append to the component type. - */ - @SuppressWarnings("unused") - public void appendIngredients(Map newIngredients) { - ingredients.remove(GTValues.FALLBACK); - newIngredients.forEach((key, value) -> ingredients.merge(key, value, (v1, v2) -> v2)); - } + public @NotNull CraftingComponent add(int tier, @NotNull Object value) { + checkType(value); + values[tier] = value; + return this; } - private static final class KJSCallWrapper { + public void remove(int tier) { + if (tier < 0 || tier >= values.length) + throw new IllegalArgumentException("Tier out of range of ULV-MAX, tier: " + tier); + values[tier] = null; + } - private static void craftingComponentModification() { - GTCEuStartupEvents.CRAFTING_COMPONENTS.post(new CraftingComponentsEventJS()); + private void checkType(@NotNull Object o) { + if ((o instanceof TagKey tag)) { + if (!tag.isFor(BuiltInRegistries.ITEM.key())) { + throw new IllegalArgumentException("TagKey must be of type TagKey"); + } + } else if (!(o instanceof ItemStack || o instanceof UnificationEntry)) { + throw new IllegalArgumentException("Object is not of type ItemStack, UnificationEntry or TagKey"); } } } diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java new file mode 100644 index 0000000000..35d89977f3 --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java @@ -0,0 +1,768 @@ +package com.gregtechceu.gtceu.data.recipe; + +import com.gregtechceu.gtceu.GTCEu; +import com.gregtechceu.gtceu.api.GTCEuAPI; +import com.gregtechceu.gtceu.api.data.chemical.material.stack.UnificationEntry; +import com.gregtechceu.gtceu.api.data.tag.TagPrefix; +import com.gregtechceu.gtceu.common.data.GTBlocks; +import com.gregtechceu.gtceu.common.data.GTItems; +import com.gregtechceu.gtceu.common.data.GTMachines; +import com.gregtechceu.gtceu.common.data.GTMaterials; +import com.gregtechceu.gtceu.data.recipe.event.CraftingComponentModificationEvent; +import com.gregtechceu.gtceu.integration.kjs.GTCEuStartupEvents; +import com.gregtechceu.gtceu.integration.kjs.events.CraftingComponentsEventJS; + +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.Tags; + +import static com.gregtechceu.gtceu.api.GTValues.*; + +public class GTCraftingComponents { + + public static CraftingComponent CIRCUIT; + public static CraftingComponent BETTER_CIRCUIT; + public static CraftingComponent PUMP; + public static CraftingComponent WIRE_ELECTRIC; + public static CraftingComponent WIRE_QUAD; + public static CraftingComponent WIRE_OCT; + public static CraftingComponent WIRE_HEX; + public static CraftingComponent CABLE; + public static CraftingComponent CABLE_DOUBLE; + public static CraftingComponent CABLE_QUAD; + public static CraftingComponent CABLE_OCT; + public static CraftingComponent CABLE_HEX; + public static CraftingComponent CABLE_TIER_UP; + public static CraftingComponent CABLE_TIER_UP_DOUBLE; + public static CraftingComponent CABLE_TIER_UP_QUAD; + public static CraftingComponent CABLE_TIER_UP_OCT; + public static CraftingComponent CABLE_TIER_UP_HEX; + public static CraftingComponent CASING; + public static CraftingComponent HULL; + public static CraftingComponent PIPE_NORMAL; + public static CraftingComponent PIPE_LARGE; + public static CraftingComponent PIPE_NONUPLE; + public static CraftingComponent GLASS; + public static CraftingComponent PLATE; + public static CraftingComponent HULL_PLATE; + public static CraftingComponent MOTOR; + public static CraftingComponent ROTOR; + public static CraftingComponent SENSOR; + public static CraftingComponent GRINDER; + public static CraftingComponent SAWBLADE; + public static CraftingComponent DIAMOND; + public static CraftingComponent PISTON; + public static CraftingComponent EMITTER; + public static CraftingComponent CONVEYOR; + public static CraftingComponent ROBOT_ARM; + public static CraftingComponent COIL_HEATING; + public static CraftingComponent COIL_HEATING_DOUBLE; + public static CraftingComponent COIL_ELECTRIC; + public static CraftingComponent STICK_MAGNETIC; + public static CraftingComponent STICK_DISTILLATION; + public static CraftingComponent FIELD_GENERATOR; + public static CraftingComponent STICK_ELECTROMAGNETIC; + public static CraftingComponent STICK_RADIOACTIVE; + public static CraftingComponent PIPE_REACTOR; + public static CraftingComponent POWER_COMPONENT; + public static CraftingComponent VOLTAGE_COIL; + public static CraftingComponent SPRING; + public static CraftingComponent CRATE; + public static CraftingComponent DRUM; + public static CraftingComponent FRAME; + public static CraftingComponent SMALL_SPRING_TRANSFORMER; + public static CraftingComponent SPRING_TRANSFORMER; + + public static void initializeComponents() { + /* + * GTCEu must supply values for at least tiers 1 through 8 (through UV) + */ + CIRCUIT = new CraftingComponent(CustomTags.ULV_CIRCUITS) + .add(ULV, CustomTags.ULV_CIRCUITS) + .add(LV, CustomTags.LV_CIRCUITS) + .add(MV, CustomTags.MV_CIRCUITS) + .add(HV, CustomTags.HV_CIRCUITS) + .add(EV, CustomTags.EV_CIRCUITS) + .add(IV, CustomTags.IV_CIRCUITS) + .add(LuV, CustomTags.LuV_CIRCUITS) + .add(ZPM, CustomTags.ZPM_CIRCUITS) + .add(UV, CustomTags.UV_CIRCUITS) + .add(UHV, CustomTags.UHV_CIRCUITS) + .add(UEV, CustomTags.UEV_CIRCUITS) + .add(UIV, CustomTags.UIV_CIRCUITS) + .add(UXV, CustomTags.UXV_CIRCUITS) + .add(OpV, CustomTags.OpV_CIRCUITS) + .add(MAX, CustomTags.MAX_CIRCUITS); + + BETTER_CIRCUIT = new CraftingComponent(CustomTags.ULV_CIRCUITS) + .add(ULV, CustomTags.LV_CIRCUITS) + .add(LV, CustomTags.MV_CIRCUITS) + .add(MV, CustomTags.HV_CIRCUITS) + .add(HV, CustomTags.EV_CIRCUITS) + .add(EV, CustomTags.IV_CIRCUITS) + .add(IV, CustomTags.LuV_CIRCUITS) + .add(LuV, CustomTags.ZPM_CIRCUITS) + .add(ZPM, CustomTags.UV_CIRCUITS) + .add(UV, CustomTags.UHV_CIRCUITS) + .add(UHV, CustomTags.UEV_CIRCUITS) + .add(UEV, CustomTags.UIV_CIRCUITS) + .add(UIV, CustomTags.UXV_CIRCUITS) + .add(UXV, CustomTags.OpV_CIRCUITS) + .add(OpV, CustomTags.MAX_CIRCUITS) + .add(MAX, CustomTags.MAX_CIRCUITS); + + WIRE_ELECTRIC = new CraftingComponent(new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Gold)) + .add(ULV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Gold)) + .add(LV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Gold)) + .add(MV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Silver)) + .add(HV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Electrum)) + .add(EV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Platinum)) + .add(IV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium)) + .add(LuV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium)) + .add(ZPM, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium)) + .add(UV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium)) + .add(UHV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Osmium)); + + WIRE_QUAD = new CraftingComponent(new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Lead)) + .add(ULV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Lead)) + .add(LV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Tungsten)) + .add(LuV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Europium)); + + WIRE_OCT = new CraftingComponent(new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Lead)) + .add(ULV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Lead)) + .add(LV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Tungsten)) + .add(LuV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Europium)); + + WIRE_HEX = new CraftingComponent(new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Lead)) + .add(ULV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Lead)) + .add(LV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Tungsten)) + .add(LuV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.wireGtHex, GTMaterials.Europium)); + + CABLE = new CraftingComponent(new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.RedAlloy)) + .add(LV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Platinum)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Europium)); + + CABLE_DOUBLE = new CraftingComponent(new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.RedAlloy)) + .add(LV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Platinum)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Europium)); + + CABLE_QUAD = new CraftingComponent(new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.RedAlloy)) + .add(LV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Platinum)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Europium)); + + CABLE_OCT = new CraftingComponent(new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.RedAlloy)) + .add(LV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Platinum)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Europium)); + + CABLE_HEX = new CraftingComponent(new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.RedAlloy)) + .add(LV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Platinum)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Europium)); + + CABLE_TIER_UP = new CraftingComponent(new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Tin)) + .add(LV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Gold)) + .add(HV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Aluminium)) + .add(EV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Platinum)) + .add(IV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.NiobiumTitanium)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.VanadiumGallium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.YttriumBariumCuprate)) + .add(UV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Europium)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.Europium)); + + CABLE_TIER_UP_DOUBLE = new CraftingComponent( + new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Tin)) + .add(LV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Gold)) + .add(HV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Aluminium)) + .add(EV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Platinum)) + .add(IV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.NiobiumTitanium)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.VanadiumGallium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.YttriumBariumCuprate)) + .add(UV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Europium)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtDouble, GTMaterials.Europium)); + + CABLE_TIER_UP_QUAD = new CraftingComponent( + new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Tin)) + .add(LV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Gold)) + .add(HV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Aluminium)) + .add(EV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Platinum)) + .add(IV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.NiobiumTitanium)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.VanadiumGallium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.YttriumBariumCuprate)) + .add(UV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Europium)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtQuadruple, GTMaterials.Europium)); + + CABLE_TIER_UP_OCT = new CraftingComponent(new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Tin)) + .add(LV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Gold)) + .add(HV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Aluminium)) + .add(EV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Platinum)) + .add(IV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.NiobiumTitanium)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.VanadiumGallium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.YttriumBariumCuprate)) + .add(UV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Europium)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtOctal, GTMaterials.Europium)); + + CABLE_TIER_UP_HEX = new CraftingComponent(new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Tin)) + .add(LV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Gold)) + .add(HV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Aluminium)) + .add(EV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Platinum)) + .add(IV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.NiobiumTitanium)) + .add(LuV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.VanadiumGallium)) + .add(ZPM, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.YttriumBariumCuprate)) + .add(UV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Europium)) + .add(UHV, new UnificationEntry(TagPrefix.cableGtHex, GTMaterials.Europium)); + + HULL = new CraftingComponent(GTMachines.HULL[ULV].asStack()) + .add(ULV, GTMachines.HULL[ULV].asStack()) + .add(LV, GTMachines.HULL[LV].asStack()) + .add(MV, GTMachines.HULL[MV].asStack()) + .add(HV, GTMachines.HULL[HV].asStack()) + .add(EV, GTMachines.HULL[EV].asStack()) + .add(IV, GTMachines.HULL[IV].asStack()) + .add(LuV, GTMachines.HULL[LuV].asStack()) + .add(ZPM, GTMachines.HULL[ZPM].asStack()) + .add(UV, GTMachines.HULL[UV].asStack()) + .add(UHV, GTMachines.HULL[UHV].asStack()); + if (GTCEuAPI.isHighTier()) { + HULL.add(UEV, GTMachines.HULL[UEV].asStack()) + .add(UIV, GTMachines.HULL[UIV].asStack()) + .add(UXV, GTMachines.HULL[UXV].asStack()) + .add(OpV, GTMachines.HULL[OpV].asStack()) + .add(MAX, GTMachines.HULL[MAX].asStack()); + } + + CASING = new CraftingComponent(GTBlocks.MACHINE_CASING_ULV.asStack()) + .add(ULV, GTBlocks.MACHINE_CASING_ULV.asStack()) + .add(LV, GTBlocks.MACHINE_CASING_LV.asStack()) + .add(MV, GTBlocks.MACHINE_CASING_MV.asStack()) + .add(HV, GTBlocks.MACHINE_CASING_HV.asStack()) + .add(EV, GTBlocks.MACHINE_CASING_EV.asStack()) + .add(IV, GTBlocks.MACHINE_CASING_IV.asStack()) + .add(LuV, GTBlocks.MACHINE_CASING_LuV.asStack()) + .add(ZPM, GTBlocks.MACHINE_CASING_ZPM.asStack()) + .add(UV, GTBlocks.MACHINE_CASING_UV.asStack()) + .add(UHV, GTBlocks.MACHINE_CASING_UHV.asStack()); + if (GTCEuAPI.isHighTier()) { + CASING.add(UEV, GTBlocks.MACHINE_CASING_UEV.asStack()) + .add(UIV, GTBlocks.MACHINE_CASING_UIV.asStack()) + .add(UXV, GTBlocks.MACHINE_CASING_UXV.asStack()) + .add(OpV, GTBlocks.MACHINE_CASING_OpV.asStack()) + .add(MAX, GTBlocks.MACHINE_CASING_MAX.asStack()); + } + + PIPE_NORMAL = new CraftingComponent(new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Bronze)) + .add(ULV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Bronze)) + .add(LV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Bronze)) + .add(MV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Steel)) + .add(HV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.StainlessSteel)) + .add(EV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Titanium)) + .add(IV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.TungstenSteel)) + .add(LuV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Iridium)) + .add(UV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Naquadah)) + .add(UHV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Naquadah)); + + PIPE_LARGE = new CraftingComponent(new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Bronze)) + .add(ULV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Bronze)) + .add(LV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Bronze)) + .add(MV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Steel)) + .add(HV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.StainlessSteel)) + .add(EV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Titanium)) + .add(IV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.TungstenSteel)) + .add(LuV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Ultimet)) + .add(UV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Naquadah)) + .add(UHV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Neutronium)); + + PIPE_NONUPLE = new CraftingComponent(new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Titanium)) + .add(EV, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Titanium)) + .add(IV, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.TungstenSteel)) + .add(LuV, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Iridium)) + .add(UV, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Naquadah)) + .add(UHV, new UnificationEntry(TagPrefix.pipeNonupleFluid, GTMaterials.Neutronium)); + + /* + * Glass: Steam-MV + * Tempered: HV, EV + * Laminated Glass: IV, LuV + * Fusion: ZPM, UV, UHV + */ + GLASS = new CraftingComponent(Tags.Items.GLASS) + .add(ULV, Tags.Items.GLASS) + .add(LV, Tags.Items.GLASS) + .add(MV, Tags.Items.GLASS) + .add(HV, GTBlocks.CASING_TEMPERED_GLASS.asStack()) + .add(EV, GTBlocks.CASING_TEMPERED_GLASS.asStack()) + .add(IV, GTBlocks.CASING_LAMINATED_GLASS.asStack()) + .add(LuV, GTBlocks.CASING_LAMINATED_GLASS.asStack()) + .add(ZPM, GTBlocks.FUSION_GLASS.asStack()) + .add(UV, GTBlocks.FUSION_GLASS.asStack()) + .add(UHV, GTBlocks.FUSION_GLASS.asStack()); + + PLATE = new CraftingComponent(new UnificationEntry(TagPrefix.plate, GTMaterials.Iron)) + .add(ULV, new UnificationEntry(TagPrefix.plate, GTMaterials.WroughtIron)) + .add(LV, new UnificationEntry(TagPrefix.plate, GTMaterials.Steel)) + .add(MV, new UnificationEntry(TagPrefix.plate, GTMaterials.Aluminium)) + .add(HV, new UnificationEntry(TagPrefix.plate, GTMaterials.StainlessSteel)) + .add(EV, new UnificationEntry(TagPrefix.plate, GTMaterials.Titanium)) + .add(IV, new UnificationEntry(TagPrefix.plate, GTMaterials.TungstenSteel)) + .add(LuV, new UnificationEntry(TagPrefix.plate, GTMaterials.RhodiumPlatedPalladium)) + .add(ZPM, new UnificationEntry(TagPrefix.plate, GTMaterials.NaquadahAlloy)) + .add(UV, new UnificationEntry(TagPrefix.plate, GTMaterials.Darmstadtium)) + .add(UHV, new UnificationEntry(TagPrefix.plate, GTMaterials.Neutronium)); + + HULL_PLATE = new CraftingComponent(new UnificationEntry(TagPrefix.plate, GTMaterials.Wood)) + .add(ULV, new UnificationEntry(TagPrefix.plate, GTMaterials.Wood)) + .add(LV, new UnificationEntry(TagPrefix.plate, GTMaterials.WroughtIron)) + .add(MV, new UnificationEntry(TagPrefix.plate, GTMaterials.WroughtIron)) + .add(HV, new UnificationEntry(TagPrefix.plate, GTMaterials.Polyethylene)) + .add(EV, new UnificationEntry(TagPrefix.plate, GTMaterials.Polyethylene)) + .add(IV, new UnificationEntry(TagPrefix.plate, GTMaterials.Polytetrafluoroethylene)) + .add(LuV, new UnificationEntry(TagPrefix.plate, GTMaterials.Polytetrafluoroethylene)) + .add(ZPM, new UnificationEntry(TagPrefix.plate, GTMaterials.Polybenzimidazole)) + .add(UV, new UnificationEntry(TagPrefix.plate, GTMaterials.Polybenzimidazole)) + .add(UHV, new UnificationEntry(TagPrefix.plate, GTMaterials.Polybenzimidazole)); + + ROTOR = new CraftingComponent(new UnificationEntry(TagPrefix.rotor, GTMaterials.Tin)) + .add(ULV, new UnificationEntry(TagPrefix.rotor, GTMaterials.Tin)) + .add(LV, new UnificationEntry(TagPrefix.rotor, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.rotor, GTMaterials.Bronze)) + .add(HV, new UnificationEntry(TagPrefix.rotor, GTMaterials.Steel)) + .add(EV, new UnificationEntry(TagPrefix.rotor, GTMaterials.StainlessSteel)) + .add(IV, new UnificationEntry(TagPrefix.rotor, GTMaterials.TungstenSteel)) + .add(LuV, new UnificationEntry(TagPrefix.rotor, GTMaterials.RhodiumPlatedPalladium)) + .add(ZPM, new UnificationEntry(TagPrefix.rotor, GTMaterials.NaquadahAlloy)) + .add(UV, new UnificationEntry(TagPrefix.rotor, GTMaterials.Darmstadtium)) + .add(UHV, new UnificationEntry(TagPrefix.rotor, GTMaterials.Darmstadtium)); + + GRINDER = new CraftingComponent(new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond)) + .add(ULV, new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond)) + .add(LV, new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond)) + .add(MV, new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond)) + .add(HV, GTItems.COMPONENT_GRINDER_DIAMOND.asStack()) + .add(EV, GTItems.COMPONENT_GRINDER_DIAMOND.asStack()) + .add(IV, GTItems.COMPONENT_GRINDER_TUNGSTEN.asStack()) + .add(LuV, GTItems.COMPONENT_GRINDER_TUNGSTEN.asStack()) + .add(ZPM, GTItems.COMPONENT_GRINDER_TUNGSTEN.asStack()) + .add(UV, GTItems.COMPONENT_GRINDER_TUNGSTEN.asStack()) + .add(UHV, GTItems.COMPONENT_GRINDER_TUNGSTEN.asStack()); + + SAWBLADE = new CraftingComponent(new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Bronze)) + .add(ULV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Bronze)) + .add(LV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.CobaltBrass)) + .add(MV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.VanadiumSteel)) + .add(HV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.RedSteel)) + .add(EV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Ultimet)) + .add(IV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.TungstenCarbide)) + .add(LuV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.HSSE)) + .add(ZPM, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.NaquadahAlloy)) + .add(UV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Duranium)) + .add(UHV, new UnificationEntry(TagPrefix.toolHeadBuzzSaw, GTMaterials.Duranium)); + + DIAMOND = new CraftingComponent(new UnificationEntry(TagPrefix.gem, GTMaterials.Diamond)); + + MOTOR = new CraftingComponent(GTItems.ELECTRIC_MOTOR_LV.asStack()) + .add(LV, GTItems.ELECTRIC_MOTOR_LV.asStack()) + .add(MV, GTItems.ELECTRIC_MOTOR_MV.asStack()) + .add(HV, GTItems.ELECTRIC_MOTOR_HV.asStack()) + .add(EV, GTItems.ELECTRIC_MOTOR_EV.asStack()) + .add(IV, GTItems.ELECTRIC_MOTOR_IV.asStack()) + .add(LuV, GTItems.ELECTRIC_MOTOR_LuV.asStack()) + .add(ZPM, GTItems.ELECTRIC_MOTOR_ZPM.asStack()) + .add(UV, GTItems.ELECTRIC_MOTOR_UV.asStack()); + if (GTCEuAPI.isHighTier()) { + MOTOR.add(UHV, GTItems.ELECTRIC_MOTOR_UHV.asStack()) + .add(UEV, GTItems.ELECTRIC_MOTOR_UEV.asStack()) + .add(UIV, GTItems.ELECTRIC_MOTOR_UIV.asStack()) + .add(UXV, GTItems.ELECTRIC_MOTOR_UXV.asStack()) + .add(OpV, GTItems.ELECTRIC_MOTOR_OpV.asStack()); + } + + PUMP = new CraftingComponent(GTItems.ELECTRIC_PUMP_LV.asStack()) + .add(LV, GTItems.ELECTRIC_PUMP_LV.asStack()) + .add(MV, GTItems.ELECTRIC_PUMP_MV.asStack()) + .add(HV, GTItems.ELECTRIC_PUMP_HV.asStack()) + .add(EV, GTItems.ELECTRIC_PUMP_EV.asStack()) + .add(IV, GTItems.ELECTRIC_PUMP_IV.asStack()) + .add(LuV, GTItems.ELECTRIC_PUMP_LuV.asStack()) + .add(ZPM, GTItems.ELECTRIC_PUMP_ZPM.asStack()) + .add(UV, GTItems.ELECTRIC_PUMP_UV.asStack()); + if (GTCEuAPI.isHighTier()) { + PUMP.add(UHV, GTItems.ELECTRIC_PUMP_UHV.asStack()) + .add(UEV, GTItems.ELECTRIC_PUMP_UEV.asStack()) + .add(UIV, GTItems.ELECTRIC_PUMP_UIV.asStack()) + .add(UXV, GTItems.ELECTRIC_PUMP_UXV.asStack()) + .add(OpV, GTItems.ELECTRIC_PUMP_OpV.asStack()); + } + + PISTON = new CraftingComponent(GTItems.ELECTRIC_PISTON_LV.asStack()) + .add(LV, GTItems.ELECTRIC_PISTON_LV.asStack()) + .add(MV, GTItems.ELECTRIC_PISTON_MV.asStack()) + .add(HV, GTItems.ELECTRIC_PISTON_HV.asStack()) + .add(EV, GTItems.ELECTRIC_PISTON_EV.asStack()) + .add(IV, GTItems.ELECTRIC_PISTON_IV.asStack()) + .add(LuV, GTItems.ELECTRIC_PISTON_LuV.asStack()) + .add(ZPM, GTItems.ELECTRIC_PISTON_ZPM.asStack()) + .add(UV, GTItems.ELECTRIC_PISTON_UV.asStack()); + if (GTCEuAPI.isHighTier()) { + PISTON.add(UHV, GTItems.ELECTRIC_PISTON_UHV.asStack()) + .add(UEV, GTItems.ELECTRIC_PISTON_UEV.asStack()) + .add(UIV, GTItems.ELECTRIC_PISTON_UIV.asStack()) + .add(UXV, GTItems.ELECTRIC_PISTON_UXV.asStack()) + .add(OpV, GTItems.ELECTRIC_PISTON_OpV.asStack()); + } + + EMITTER = new CraftingComponent(GTItems.EMITTER_LV.asStack()) + .add(LV, GTItems.EMITTER_LV.asStack()) + .add(MV, GTItems.EMITTER_MV.asStack()) + .add(HV, GTItems.EMITTER_HV.asStack()) + .add(EV, GTItems.EMITTER_EV.asStack()) + .add(IV, GTItems.EMITTER_IV.asStack()) + .add(LuV, GTItems.EMITTER_LuV.asStack()) + .add(ZPM, GTItems.EMITTER_ZPM.asStack()) + .add(UV, GTItems.EMITTER_UV.asStack()); + + if (GTCEuAPI.isHighTier()) { + EMITTER.add(UHV, GTItems.EMITTER_UHV.asStack()) + .add(UEV, GTItems.EMITTER_UEV.asStack()) + .add(UIV, GTItems.EMITTER_UIV.asStack()) + .add(UXV, GTItems.EMITTER_UXV.asStack()) + .add(OpV, GTItems.EMITTER_OpV.asStack()); + } + + SENSOR = new CraftingComponent(GTItems.SENSOR_LV.asStack()) + .add(LV, GTItems.SENSOR_LV.asStack()) + .add(MV, GTItems.SENSOR_MV.asStack()) + .add(HV, GTItems.SENSOR_HV.asStack()) + .add(EV, GTItems.SENSOR_EV.asStack()) + .add(IV, GTItems.SENSOR_IV.asStack()) + .add(LuV, GTItems.SENSOR_LuV.asStack()) + .add(ZPM, GTItems.SENSOR_ZPM.asStack()) + .add(UV, GTItems.SENSOR_UV.asStack()); + if (GTCEuAPI.isHighTier()) { + SENSOR.add(UHV, GTItems.SENSOR_UHV.asStack()) + .add(UEV, GTItems.SENSOR_UEV.asStack()) + .add(UIV, GTItems.SENSOR_UIV.asStack()) + .add(UXV, GTItems.SENSOR_UXV.asStack()) + .add(OpV, GTItems.SENSOR_OpV.asStack()); + } + + CONVEYOR = new CraftingComponent(GTItems.CONVEYOR_MODULE_LV.asStack()) + .add(LV, GTItems.CONVEYOR_MODULE_LV.asStack()) + .add(MV, GTItems.CONVEYOR_MODULE_MV.asStack()) + .add(HV, GTItems.CONVEYOR_MODULE_HV.asStack()) + .add(EV, GTItems.CONVEYOR_MODULE_EV.asStack()) + .add(IV, GTItems.CONVEYOR_MODULE_IV.asStack()) + .add(LuV, GTItems.CONVEYOR_MODULE_LuV.asStack()) + .add(ZPM, GTItems.CONVEYOR_MODULE_ZPM.asStack()) + .add(UV, GTItems.CONVEYOR_MODULE_UV.asStack()); + if (GTCEuAPI.isHighTier()) { + CONVEYOR.add(UHV, GTItems.CONVEYOR_MODULE_UHV.asStack()) + .add(UEV, GTItems.CONVEYOR_MODULE_UEV.asStack()) + .add(UIV, GTItems.CONVEYOR_MODULE_UIV.asStack()) + .add(UXV, GTItems.CONVEYOR_MODULE_UXV.asStack()) + .add(OpV, GTItems.CONVEYOR_MODULE_OpV.asStack()); + } + + ROBOT_ARM = new CraftingComponent(GTItems.ROBOT_ARM_LV.asStack()) + .add(LV, GTItems.ROBOT_ARM_LV.asStack()) + .add(MV, GTItems.ROBOT_ARM_MV.asStack()) + .add(HV, GTItems.ROBOT_ARM_HV.asStack()) + .add(EV, GTItems.ROBOT_ARM_EV.asStack()) + .add(IV, GTItems.ROBOT_ARM_IV.asStack()) + .add(LuV, GTItems.ROBOT_ARM_LuV.asStack()) + .add(ZPM, GTItems.ROBOT_ARM_ZPM.asStack()) + .add(UV, GTItems.ROBOT_ARM_UV.asStack()); + if (GTCEuAPI.isHighTier()) { + ROBOT_ARM.add(UHV, GTItems.ROBOT_ARM_UHV.asStack()) + .add(UEV, GTItems.ROBOT_ARM_UEV.asStack()) + .add(UIV, GTItems.ROBOT_ARM_UIV.asStack()) + .add(UXV, GTItems.ROBOT_ARM_UXV.asStack()) + .add(OpV, GTItems.ROBOT_ARM_OpV.asStack()); + } + + FIELD_GENERATOR = new CraftingComponent(GTItems.FIELD_GENERATOR_LV.asStack()) + .add(LV, GTItems.FIELD_GENERATOR_LV.asStack()) + .add(MV, GTItems.FIELD_GENERATOR_MV.asStack()) + .add(HV, GTItems.FIELD_GENERATOR_HV.asStack()) + .add(EV, GTItems.FIELD_GENERATOR_EV.asStack()) + .add(IV, GTItems.FIELD_GENERATOR_IV.asStack()) + .add(LuV, GTItems.FIELD_GENERATOR_LuV.asStack()) + .add(ZPM, GTItems.FIELD_GENERATOR_ZPM.asStack()) + .add(UV, GTItems.FIELD_GENERATOR_UV.asStack()); + if (GTCEuAPI.isHighTier()) { + FIELD_GENERATOR.add(UHV, GTItems.FIELD_GENERATOR_UHV.asStack()) + .add(UEV, GTItems.FIELD_GENERATOR_UEV.asStack()) + .add(UIV, GTItems.FIELD_GENERATOR_UIV.asStack()) + .add(UXV, GTItems.FIELD_GENERATOR_UXV.asStack()) + .add(OpV, GTItems.FIELD_GENERATOR_OpV.asStack()); + } + + COIL_HEATING = new CraftingComponent(new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Copper)) + .add(ULV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Copper)) + .add(LV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Cupronickel)) + .add(HV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Kanthal)) + .add(EV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Nichrome)) + .add(IV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.RTMAlloy)) + .add(LuV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.HSSG)) + .add(ZPM, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Naquadah)) + .add(UV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.NaquadahAlloy)) + .add(UHV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Trinium)); + + COIL_HEATING_DOUBLE = new CraftingComponent(new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Copper)) + .add(ULV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Copper)) + .add(LV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Cupronickel)) + .add(HV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Kanthal)) + .add(EV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Nichrome)) + .add(IV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.RTMAlloy)) + .add(LuV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.HSSG)) + .add(ZPM, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Naquadah)) + .add(UV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.NaquadahAlloy)) + .add(UHV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Trinium)); + + COIL_ELECTRIC = new CraftingComponent(new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Tin)) + .add(ULV, new UnificationEntry(TagPrefix.wireGtSingle, GTMaterials.Tin)) + .add(LV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.wireGtDouble, GTMaterials.Silver)) + .add(EV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Steel)) + .add(IV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.Graphene)) + .add(LuV, new UnificationEntry(TagPrefix.wireGtQuadruple, GTMaterials.NiobiumNitride)) + .add(ZPM, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.wireGtOctal, GTMaterials.Europium)); + + STICK_MAGNETIC = new CraftingComponent(new UnificationEntry(TagPrefix.rod, GTMaterials.IronMagnetic)) + .add(ULV, new UnificationEntry(TagPrefix.rod, GTMaterials.IronMagnetic)) + .add(LV, new UnificationEntry(TagPrefix.rod, GTMaterials.IronMagnetic)) + .add(MV, new UnificationEntry(TagPrefix.rod, GTMaterials.SteelMagnetic)) + .add(HV, new UnificationEntry(TagPrefix.rod, GTMaterials.SteelMagnetic)) + .add(EV, new UnificationEntry(TagPrefix.rod, GTMaterials.NeodymiumMagnetic)) + .add(IV, new UnificationEntry(TagPrefix.rod, GTMaterials.NeodymiumMagnetic)) + .add(LuV, new UnificationEntry(TagPrefix.rodLong, GTMaterials.NeodymiumMagnetic)) + .add(ZPM, new UnificationEntry(TagPrefix.rodLong, GTMaterials.NeodymiumMagnetic)) + .add(UV, new UnificationEntry(TagPrefix.block, GTMaterials.NeodymiumMagnetic)) + .add(UHV, new UnificationEntry(TagPrefix.block, GTMaterials.SamariumMagnetic)); + + STICK_DISTILLATION = new CraftingComponent(new UnificationEntry(TagPrefix.rod, GTMaterials.Blaze)) + .add(ULV, new UnificationEntry(TagPrefix.rod, GTMaterials.Blaze)) + .add(LV, new UnificationEntry(TagPrefix.spring, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.spring, GTMaterials.Cupronickel)) + .add(HV, new UnificationEntry(TagPrefix.spring, GTMaterials.Kanthal)) + .add(EV, new UnificationEntry(TagPrefix.spring, GTMaterials.Nichrome)) + .add(IV, new UnificationEntry(TagPrefix.spring, GTMaterials.RTMAlloy)) + .add(LuV, new UnificationEntry(TagPrefix.spring, GTMaterials.HSSG)) + .add(ZPM, new UnificationEntry(TagPrefix.spring, GTMaterials.Naquadah)) + .add(UV, new UnificationEntry(TagPrefix.spring, GTMaterials.NaquadahAlloy)) + .add(UHV, new UnificationEntry(TagPrefix.spring, GTMaterials.Trinium)); + + STICK_ELECTROMAGNETIC = new CraftingComponent(new UnificationEntry(TagPrefix.rod, GTMaterials.Iron)) + .add(ULV, new UnificationEntry(TagPrefix.rod, GTMaterials.Iron)) + .add(LV, new UnificationEntry(TagPrefix.rod, GTMaterials.Iron)) + .add(MV, new UnificationEntry(TagPrefix.rod, GTMaterials.Steel)) + .add(HV, new UnificationEntry(TagPrefix.rod, GTMaterials.Steel)) + .add(EV, new UnificationEntry(TagPrefix.rod, GTMaterials.Neodymium)) + .add(IV, new UnificationEntry(TagPrefix.rod, GTMaterials.VanadiumGallium)) + .add(LuV, new UnificationEntry(TagPrefix.rod, GTMaterials.VanadiumGallium)) + .add(ZPM, new UnificationEntry(TagPrefix.rod, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.rod, GTMaterials.VanadiumGallium)) + .add(UHV, new UnificationEntry(TagPrefix.rod, GTMaterials.VanadiumGallium)); + + STICK_RADIOACTIVE = new CraftingComponent(new UnificationEntry(TagPrefix.rod, GTMaterials.Uranium235)) + .add(EV, new UnificationEntry(TagPrefix.rod, GTMaterials.Uranium235)) + .add(IV, new UnificationEntry(TagPrefix.rod, GTMaterials.Plutonium241)) + .add(LuV, new UnificationEntry(TagPrefix.rod, GTMaterials.NaquadahEnriched)) + .add(ZPM, new UnificationEntry(TagPrefix.rod, GTMaterials.Americium)) + .add(UV, new UnificationEntry(TagPrefix.rod, GTMaterials.Tritanium)) + .add(UHV, new UnificationEntry(TagPrefix.rod, GTMaterials.Tritanium)); + + PIPE_REACTOR = new CraftingComponent(Tags.Items.GLASS) + .add(ULV, Tags.Items.GLASS) + .add(LV, Tags.Items.GLASS) + .add(MV, Tags.Items.GLASS) + .add(HV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Polyethylene)) + .add(EV, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Polyethylene)) + .add(IV, new UnificationEntry(TagPrefix.pipeHugeFluid, GTMaterials.Polyethylene)) + .add(LuV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Polytetrafluoroethylene)) + .add(ZPM, new UnificationEntry(TagPrefix.pipeLargeFluid, GTMaterials.Polytetrafluoroethylene)) + .add(UV, new UnificationEntry(TagPrefix.pipeHugeFluid, GTMaterials.Polytetrafluoroethylene)) + .add(UHV, new UnificationEntry(TagPrefix.pipeNormalFluid, GTMaterials.Polybenzimidazole)); + + POWER_COMPONENT = new CraftingComponent(GTItems.ULTRA_LOW_POWER_INTEGRATED_CIRCUIT.asStack()) + .add(MV, GTItems.ULTRA_LOW_POWER_INTEGRATED_CIRCUIT.asStack()) + .add(HV, GTItems.LOW_POWER_INTEGRATED_CIRCUIT.asStack()) + .add(EV, GTItems.POWER_INTEGRATED_CIRCUIT.asStack()) + .add(IV, GTItems.HIGH_POWER_INTEGRATED_CIRCUIT.asStack()) + .add(LuV, GTItems.HIGH_POWER_INTEGRATED_CIRCUIT.asStack()) + .add(ZPM, GTItems.ULTRA_HIGH_POWER_INTEGRATED_CIRCUIT.asStack()) + .add(UV, GTItems.ULTRA_HIGH_POWER_INTEGRATED_CIRCUIT.asStack()) + .add(UHV, GTItems.ULTRA_HIGH_POWER_INTEGRATED_CIRCUIT.asStack()); + + VOLTAGE_COIL = new CraftingComponent(GTItems.VOLTAGE_COIL_ULV.asStack()) + .add(ULV, GTItems.VOLTAGE_COIL_ULV.asStack()) + .add(LV, GTItems.VOLTAGE_COIL_LV.asStack()) + .add(MV, GTItems.VOLTAGE_COIL_MV.asStack()) + .add(HV, GTItems.VOLTAGE_COIL_HV.asStack()) + .add(EV, GTItems.VOLTAGE_COIL_EV.asStack()) + .add(IV, GTItems.VOLTAGE_COIL_IV.asStack()) + .add(LuV, GTItems.VOLTAGE_COIL_LuV.asStack()) + .add(ZPM, GTItems.VOLTAGE_COIL_ZPM.asStack()) + .add(UV, GTItems.VOLTAGE_COIL_UV.asStack()); + + SPRING = new CraftingComponent(new UnificationEntry(TagPrefix.spring, GTMaterials.Lead)) + .add(ULV, new UnificationEntry(TagPrefix.spring, GTMaterials.Lead)) + .add(LV, new UnificationEntry(TagPrefix.spring, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.spring, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.spring, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.spring, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.spring, GTMaterials.Tungsten)) + .add(LuV, new UnificationEntry(TagPrefix.spring, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.spring, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.spring, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.spring, GTMaterials.Europium)); + + CRATE = new CraftingComponent(Tags.Items.CHESTS_WOODEN) + .add(ULV, Tags.Items.CHESTS_WOODEN) + .add(LV, GTMachines.WOODEN_CRATE.asStack()) + .add(MV, GTMachines.BRONZE_CRATE.asStack()) + .add(HV, GTMachines.STEEL_CRATE.asStack()) + .add(EV, GTMachines.ALUMINIUM_CRATE.asStack()) + .add(IV, GTMachines.STAINLESS_STEEL_CRATE.asStack()) + .add(LuV, GTMachines.TITANIUM_CRATE.asStack()) + .add(ZPM, GTMachines.TUNGSTENSTEEL_CRATE.asStack()) + .add(UV, GTMachines.SUPER_CHEST[1].asStack()) + .add(UHV, GTMachines.SUPER_CHEST[2].asStack()); + + DRUM = new CraftingComponent(Tags.Items.GLASS) + .add(ULV, Tags.Items.GLASS) + .add(LV, GTMachines.WOODEN_DRUM.asStack()) + .add(MV, GTMachines.BRONZE_DRUM.asStack()) + .add(HV, GTMachines.STEEL_DRUM.asStack()) + .add(EV, GTMachines.ALUMINIUM_DRUM.asStack()) + .add(IV, GTMachines.STAINLESS_STEEL_DRUM.asStack()) + .add(LuV, GTMachines.TITANIUM_DRUM.asStack()) + .add(ZPM, GTMachines.TUNGSTENSTEEL_DRUM.asStack()) + .add(UV, GTMachines.SUPER_TANK[1].asStack()) + .add(UHV, GTMachines.SUPER_TANK[2].asStack()); + + FRAME = new CraftingComponent(new UnificationEntry(TagPrefix.frameGt, GTMaterials.Wood)) + .add(ULV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Wood)) + .add(LV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Steel)) + .add(MV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Aluminium)) + .add(HV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.StainlessSteel)) + .add(EV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Titanium)) + .add(IV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.TungstenSteel)) + .add(LuV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Ruridit)) + .add(ZPM, new UnificationEntry(TagPrefix.frameGt, GTMaterials.Iridium)) + .add(UV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.NaquadahAlloy)) + .add(UHV, new UnificationEntry(TagPrefix.frameGt, GTMaterials.NaquadahAlloy)); + + SMALL_SPRING_TRANSFORMER = new CraftingComponent( + new UnificationEntry(TagPrefix.springSmall, GTMaterials.RedAlloy)) + .add(ULV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.RedAlloy)) + .add(LV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.Tin)) + .add(MV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.Copper)) + .add(HV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.Gold)) + .add(EV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.Aluminium)) + .add(IV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.Platinum)) + .add(LuV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.NiobiumTitanium)) + .add(ZPM, new UnificationEntry(TagPrefix.springSmall, GTMaterials.VanadiumGallium)) + .add(UV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.YttriumBariumCuprate)) + .add(UHV, new UnificationEntry(TagPrefix.springSmall, GTMaterials.Europium)); + + SPRING_TRANSFORMER = new CraftingComponent(new UnificationEntry(TagPrefix.spring, GTMaterials.Tin)) + .add(ULV, new UnificationEntry(TagPrefix.spring, GTMaterials.Tin)) + .add(LV, new UnificationEntry(TagPrefix.spring, GTMaterials.Copper)) + .add(MV, new UnificationEntry(TagPrefix.spring, GTMaterials.Gold)) + .add(HV, new UnificationEntry(TagPrefix.spring, GTMaterials.Aluminium)) + .add(EV, new UnificationEntry(TagPrefix.spring, GTMaterials.Platinum)) + .add(IV, new UnificationEntry(TagPrefix.spring, GTMaterials.NiobiumTitanium)) + .add(LuV, new UnificationEntry(TagPrefix.spring, GTMaterials.VanadiumGallium)) + .add(ZPM, new UnificationEntry(TagPrefix.spring, GTMaterials.YttriumBariumCuprate)) + .add(UV, new UnificationEntry(TagPrefix.spring, GTMaterials.Europium)) + .add(UHV, new UnificationEntry(TagPrefix.spring, GTMaterials.Europium)); + + MinecraftForge.EVENT_BUS.post(new CraftingComponentModificationEvent()); + if (GTCEu.isKubeJSLoaded()) { + KJSCallWrapper.craftingComponentModification(); + } + } + + private static final class KJSCallWrapper { + + private static void craftingComponentModification() { + GTCEuStartupEvents.CRAFTING_COMPONENTS.post(new CraftingComponentsEventJS()); + } + } +} diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/MaterialRecipeHandler.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/MaterialRecipeHandler.java index 156c68fdc0..11ebeccf93 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/MaterialRecipeHandler.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/MaterialRecipeHandler.java @@ -13,7 +13,6 @@ import com.gregtechceu.gtceu.api.recipe.ingredient.FluidIngredient; import com.gregtechceu.gtceu.common.data.*; import com.gregtechceu.gtceu.config.ConfigHolder; -import com.gregtechceu.gtceu.data.recipe.CraftingComponent; import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; import com.gregtechceu.gtceu.data.recipe.builder.GTRecipeBuilder; import com.gregtechceu.gtceu.utils.FormattingUtil; @@ -34,6 +33,7 @@ import static com.gregtechceu.gtceu.api.data.tag.TagPrefix.*; import static com.gregtechceu.gtceu.common.data.GTMaterials.*; import static com.gregtechceu.gtceu.common.data.GTRecipeTypes.*; +import static com.gregtechceu.gtceu.common.data.GTRecipes.EBF_GASES; public class MaterialRecipeHandler { @@ -194,7 +194,7 @@ private static void processEBFRecipe(Material material, BlastProperty property, .EUt(EUt); if (gasTier != null) { - FluidIngredient gas = CraftingComponent.EBF_GASES.get(gasTier).copy(); + FluidIngredient gas = EBF_GASES.get(gasTier).copy(); blastBuilder.copy("blast_" + material.getName()) .circuitMeta(1) diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java index dab0320afd..3b7c36de02 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java @@ -10,6 +10,7 @@ import com.gregtechceu.gtceu.common.data.machines.GTMachineUtils; import com.gregtechceu.gtceu.common.data.machines.GTMultiMachines; import com.gregtechceu.gtceu.config.ConfigHolder; +import com.gregtechceu.gtceu.data.recipe.CraftingComponent; import com.gregtechceu.gtceu.data.recipe.CustomTags; import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; @@ -29,9 +30,9 @@ import java.util.function.Consumer; import static com.gregtechceu.gtceu.api.GTValues.*; -import static com.gregtechceu.gtceu.data.recipe.CraftingComponent.*; -import static com.gregtechceu.gtceu.data.recipe.CraftingComponent.HULL; -import static com.gregtechceu.gtceu.data.recipe.CraftingComponent.PUMP; +import static com.gregtechceu.gtceu.data.recipe.GTCraftingComponents.*; +import static com.gregtechceu.gtceu.data.recipe.GTCraftingComponents.HULL; +import static com.gregtechceu.gtceu.data.recipe.GTCraftingComponents.PUMP; public class MetaTileEntityLoader { @@ -392,16 +393,16 @@ public static void init(Consumer provider) { "dwx", "hHc", "fsr", 'H', GTMachines.HULL[GTValues.LV].asStack()); VanillaRecipeHelper.addShapedRecipe(provider, true, "maintenance_hatch_configurable", GTMachines.CONFIGURABLE_MAINTENANCE_HATCH.asStack(), " ", "CMC", "VHV", 'C', - CIRCUIT.getIngredient(HV), 'M', GTMachines.MAINTENANCE_HATCH.asStack(), 'V', CONVEYOR.getIngredient(HV), + CIRCUIT.get(HV), 'M', GTMachines.MAINTENANCE_HATCH.asStack(), 'V', CONVEYOR.get(HV), 'H', GTMachines.HULL[HV].asStack()); VanillaRecipeHelper.addShapedRecipe(provider, true, "maintenance_hatch_automatic", - GTMachines.AUTO_MAINTENANCE_HATCH.asStack(), "CMC", "RHR", "CMC", 'C', CIRCUIT.getIngredient(HV), 'M', - GTMachines.MAINTENANCE_HATCH.asStack(), 'R', ROBOT_ARM.getIngredient(HV), 'H', + GTMachines.AUTO_MAINTENANCE_HATCH.asStack(), "CMC", "RHR", "CMC", 'C', CIRCUIT.get(HV), 'M', + GTMachines.MAINTENANCE_HATCH.asStack(), 'R', ROBOT_ARM.get(HV), 'H', GTMachines.HULL[HV].asStack()); VanillaRecipeHelper.addShapedRecipe(provider, true, "maintenance_hatch_cleaning", GTMachines.CLEANING_MAINTENANCE_HATCH.asStack(), "CMC", "RHR", "WCW", 'C', - CIRCUIT.getIngredient(GTValues.UV), 'M', GTMachines.AUTO_MAINTENANCE_HATCH.asStack(), 'R', - ROBOT_ARM.getIngredient(GTValues.UV), 'H', GTMachines.HULL[GTValues.UV].asStack(), 'W', + CIRCUIT.get(GTValues.UV), 'M', GTMachines.AUTO_MAINTENANCE_HATCH.asStack(), 'R', + ROBOT_ARM.get(GTValues.UV), 'H', GTMachines.HULL[GTValues.UV].asStack(), 'W', new UnificationEntry(TagPrefix.cableGtSingle, GTMaterials.YttriumBariumCuprate)); // TODO Access Interface @@ -909,8 +910,8 @@ public static void init(Consumer provider) { int fluidAmount = GTValues.L * 2 * (tier + 1); GTRecipeTypes.ASSEMBLER_RECIPES .recipeBuilder("fluid_hatch_" + VN[tier].toLowerCase() + "_" + fluidMap[j].getName()) - .inputItems(HULL.getIngredient(tier)) - .inputItems(DRUM.getIngredient(tier)) + .inputItems(HULL.get(tier)) + .inputItems(DRUM.get(tier)) .circuitMeta(1) .inputFluids(fluidMap[j].getFluid(fluidAmount >> j)) .outputItems(machine) @@ -928,8 +929,8 @@ public static void init(Consumer provider) { int fluidAmount = GTValues.L * 2 * (tier + 1); GTRecipeTypes.ASSEMBLER_RECIPES .recipeBuilder("fluid_export_hatch_" + VN[tier].toLowerCase() + "_" + fluidMap[j].getName()) - .inputItems(HULL.getIngredient(tier)) - .inputItems(DRUM.getIngredient(tier)) + .inputItems(HULL.get(tier)) + .inputItems(DRUM.get(tier)) .circuitMeta(2) .inputFluids(fluidMap[j].getFluid(fluidAmount >> j)) .outputItems(machine) @@ -947,8 +948,8 @@ public static void init(Consumer provider) { int fluidAmount = GTValues.L * 2 * (tier + 1); GTRecipeTypes.ASSEMBLER_RECIPES .recipeBuilder("item_import_bus_" + VN[tier].toLowerCase() + "_" + fluidMap[j].getName()) - .inputItems(HULL.getIngredient(tier)) - .inputItems(CRATE.getIngredient(tier)) + .inputItems(HULL.get(tier)) + .inputItems(CRATE.get(tier)) .circuitMeta(1) .inputFluids(fluidMap[j].getFluid(fluidAmount >> j)) .outputItems(machine) @@ -966,8 +967,8 @@ public static void init(Consumer provider) { int fluidAmount = GTValues.L * 2 * (tier + 1); GTRecipeTypes.ASSEMBLER_RECIPES .recipeBuilder("item_export_bus_" + VN[tier].toLowerCase() + "_" + fluidMap[j].getName()) - .inputItems(HULL.getIngredient(tier)) - .inputItems(CRATE.getIngredient(tier)) + .inputItems(HULL.get(tier)) + .inputItems(CRATE.get(tier)) .circuitMeta(2) .inputFluids(fluidMap[j].getFluid(fluidAmount >> j)) .outputItems(machine) @@ -987,8 +988,8 @@ public static void init(Consumer provider) { .recipeBuilder("dual_import_bus_" + VN[tier].toLowerCase() + "_" + fluidMap[j].getName()) .inputItems(GTMachines.ITEM_IMPORT_BUS[tier]) .inputItems(GTMachines.FLUID_IMPORT_HATCH[tier]) - .inputItems(PIPE_NONUPLE.getIngredient(tier)) - .inputItems(FRAME.getIngredient(tier), 3) + .inputItems(PIPE_NONUPLE.get(tier)) + .inputItems(FRAME.get(tier), 3) .circuitMeta(1) .inputFluids(fluidMap[j].getFluid(fluidAmount >> j)) .outputItems(machine) @@ -1008,8 +1009,8 @@ public static void init(Consumer provider) { .recipeBuilder("dual_export_bus_" + VN[tier].toLowerCase() + "_" + fluidMap[j].getName()) .inputItems(GTMachines.ITEM_IMPORT_BUS[tier]) .inputItems(GTMachines.FLUID_IMPORT_HATCH[tier]) - .inputItems(PIPE_NONUPLE.getIngredient(tier)) - .inputItems(FRAME.getIngredient(tier), 3) + .inputItems(PIPE_NONUPLE.get(tier)) + .inputItems(FRAME.get(tier), 3) .circuitMeta(2) .inputFluids(fluidMap[j].getFluid(fluidAmount >> j)) .outputItems(machine) @@ -1182,7 +1183,7 @@ public static void init(Consumer provider) { VanillaRecipeHelper.addShapedRecipe(provider, true, "cleanroom", GTMultiMachines.CLEANROOM.asStack(), "FFF", "RHR", "MCM", 'F', GTItems.ITEM_FILTER.asStack(), 'R', - new UnificationEntry(TagPrefix.rotor, GTMaterials.StainlessSteel), 'H', HULL.getIngredient(HV), 'M', + new UnificationEntry(TagPrefix.rotor, GTMaterials.StainlessSteel), 'H', HULL.get(HV), 'M', GTItems.ELECTRIC_MOTOR_HV.asStack(), 'C', CustomTags.HV_CIRCUITS); if (ConfigHolder.INSTANCE.compat.energy.enableFEConverters) { @@ -1230,11 +1231,8 @@ public static void registerMachineRecipe(Consumer provider, Mach private static Object[] prepareRecipe(int tier, Object... recipe) { for (int i = 3; i < recipe.length; i++) { - if (recipe[i] instanceof Component) { - Object component = ((Component) recipe[i]).getIngredient(tier); - if (component == null) { - return null; - } + if (recipe[i] instanceof CraftingComponent) { + Object component = ((CraftingComponent) recipe[i]).get(tier); recipe[i] = component; } else if (recipe[i] instanceof Item item) { recipe[i] = new ItemStack(item); diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityMachineRecipeLoader.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityMachineRecipeLoader.java index 00e7a51172..6fd47bc3e4 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityMachineRecipeLoader.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityMachineRecipeLoader.java @@ -3,13 +3,12 @@ import com.gregtechceu.gtceu.GTCEu; import com.gregtechceu.gtceu.api.GTCEuAPI; import com.gregtechceu.gtceu.api.GTValues; -import com.gregtechceu.gtceu.api.data.chemical.ChemicalHelper; import com.gregtechceu.gtceu.api.data.chemical.material.stack.UnificationEntry; import com.gregtechceu.gtceu.api.machine.MachineDefinition; import com.gregtechceu.gtceu.common.data.machines.GTAEMachines; import com.gregtechceu.gtceu.common.data.machines.GTMultiMachines; -import com.gregtechceu.gtceu.data.recipe.CraftingComponent; import com.gregtechceu.gtceu.data.recipe.CustomTags; +import com.gregtechceu.gtceu.data.recipe.GTCraftingComponents; import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; import net.minecraft.data.recipes.FinishedRecipe; @@ -35,7 +34,7 @@ public class MetaTileEntityMachineRecipeLoader { public static void init(Consumer provider) { // this needs to exist here now :) - CraftingComponent.initializeComponents(); + GTCraftingComponents.initializeComponents(); // Reservoir Hatch ASSEMBLER_RECIPES.recipeBuilder("reservoir_hatch") @@ -304,18 +303,14 @@ public static void init(Consumer provider) { for (int tier = 0; tier < POWER_TRANSFORMER.length; tier++) { var hatch = POWER_TRANSFORMER[tier]; if (hatch == null) continue; - // Assume they actually are nonnull for now. - var materialPrime = ChemicalHelper.getMaterial(CraftingComponent.CABLE_HEX.getIngredient(tier)).material(); - var materialSecond = ChemicalHelper.getMaterial(CraftingComponent.CABLE_TIER_UP_OCT.getIngredient(tier)) - .material(); ASSEMBLER_RECIPES.recipeBuilder(GTValues.VN[tier].toLowerCase() + "_power_transformer") .inputItems(HI_AMP_TRANSFORMER_4A[tier]) - .inputItems(CraftingComponent.PUMP.getIngredient((tier / 2 + 1))) - .inputItems(CraftingComponent.CABLE_TIER_UP_OCT.getIngredient(tier)) - .inputItems(CraftingComponent.CABLE_HEX.getIngredient(tier)) - .inputItems(springSmall, materialPrime) - .inputItems(spring, materialSecond) + .inputItems(GTCraftingComponents.PUMP.get((tier / 2 + 1))) + .inputItems(GTCraftingComponents.CABLE_TIER_UP_OCT.get(tier)) + .inputItems(GTCraftingComponents.CABLE_HEX.get(tier)) + .inputItems(GTCraftingComponents.SMALL_SPRING_TRANSFORMER.get(tier)) + .inputItems(GTCraftingComponents.SPRING_TRANSFORMER.get(tier)) .inputFluids(Lubricant.getFluid(2000)) .outputItems(hatch) .duration(100).EUt(VA[tier]).save(provider); @@ -328,8 +323,8 @@ public static void init(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder("energy_hatch_4a_" + GTValues.VN[tier].toLowerCase()) .inputItems(ENERGY_INPUT_HATCH[tier]) - .inputItems(CraftingComponent.WIRE_QUAD.getIngredient(tier), 2) - .inputItems(CraftingComponent.PLATE.getIngredient(tier), 2) + .inputItems(GTCraftingComponents.WIRE_QUAD.get(tier), 2) + .inputItems(GTCraftingComponents.PLATE.get(tier), 2) .outputItems(hatch) .duration(100).EUt(VA[tier]).save(provider); } @@ -349,8 +344,8 @@ public static void init(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder("energy_hatch_16a_" + GTValues.VN[tier].toLowerCase()) .inputItems(transformer) .inputItems(ENERGY_INPUT_HATCH_4A[tier]) - .inputItems(CraftingComponent.WIRE_OCT.getIngredient(tier), 2) - .inputItems(CraftingComponent.PLATE.getIngredient(tier), 4) + .inputItems(GTCraftingComponents.WIRE_OCT.get(tier), 2) + .inputItems(GTCraftingComponents.PLATE.get(tier), 4) .outputItems(hatch) .duration(200).EUt(VA[tier]).save(provider); } @@ -370,8 +365,8 @@ public static void init(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder("substation_energy_hatch_" + GTValues.VN[tier].toLowerCase()) .inputItems(transformer) .inputItems(ENERGY_INPUT_HATCH_16A[tier]) - .inputItems(CraftingComponent.WIRE_HEX.getIngredient(tier), 2) - .inputItems(CraftingComponent.PLATE.getIngredient(tier), 6) + .inputItems(GTCraftingComponents.WIRE_HEX.get(tier), 2) + .inputItems(GTCraftingComponents.PLATE.get(tier), 6) .outputItems(hatch) .duration(400).EUt(VA[tier]).save(provider); } @@ -383,8 +378,8 @@ public static void init(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder("dynamo_hatch_4a_" + GTValues.VN[tier].toLowerCase()) .inputItems(ENERGY_OUTPUT_HATCH[tier]) - .inputItems(CraftingComponent.WIRE_QUAD.getIngredient(tier), 2) - .inputItems(CraftingComponent.PLATE.getIngredient(tier), 2) + .inputItems(GTCraftingComponents.WIRE_QUAD.get(tier), 2) + .inputItems(GTCraftingComponents.PLATE.get(tier), 2) .outputItems(hatch) .duration(100).EUt(VA[tier - 1]).save(provider); } @@ -404,8 +399,8 @@ public static void init(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder("dynamo_hatch_16a_" + GTValues.VN[tier].toLowerCase()) .inputItems(transformer) .inputItems(ENERGY_OUTPUT_HATCH_4A[tier]) - .inputItems(CraftingComponent.WIRE_OCT.getIngredient(tier), 2) - .inputItems(CraftingComponent.PLATE.getIngredient(tier), 4) + .inputItems(GTCraftingComponents.WIRE_OCT.get(tier), 2) + .inputItems(GTCraftingComponents.PLATE.get(tier), 4) .outputItems(hatch) .duration(200).EUt(VA[tier]).save(provider); } @@ -426,8 +421,8 @@ public static void init(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder("substation_dynamo_hatch_" + GTValues.VN[tier].toLowerCase()) .inputItems(transformer) .inputItems(ENERGY_OUTPUT_HATCH_16A[tier]) - .inputItems(CraftingComponent.WIRE_HEX.getIngredient(tier), 2) - .inputItems(CraftingComponent.PLATE.getIngredient(tier), 6) + .inputItems(GTCraftingComponents.WIRE_HEX.get(tier), 2) + .inputItems(GTCraftingComponents.PLATE.get(tier), 6) .outputItems(hatch) .duration(400).EUt(VA[tier]).save(provider); } @@ -649,9 +644,9 @@ private static void registerLaserRecipes(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder(GTValues.VN[tier].toLowerCase() + "_256a_laser_target_hatch") .inputItems(HULL[tier]) .inputItems(lens, Diamond) - .inputItems(CraftingComponent.SENSOR.getIngredient(tier)) - .inputItems(CraftingComponent.PUMP.getIngredient(tier)) - .inputItems(CraftingComponent.CABLE.getIngredient(tier), 4) + .inputItems(GTCraftingComponents.SENSOR.get(tier)) + .inputItems(GTCraftingComponents.PUMP.get(tier)) + .inputItems(GTCraftingComponents.CABLE.get(tier), 4) .circuitMeta(1) .outputItems(hatch) .duration(300).EUt(VA[tier]).save(provider); @@ -665,9 +660,9 @@ private static void registerLaserRecipes(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder(GTValues.VN[tier].toLowerCase() + "_256a_laser_source_hatch") .inputItems(HULL[tier]) .inputItems(lens, Diamond) - .inputItems(CraftingComponent.EMITTER.getIngredient(tier)) - .inputItems(CraftingComponent.PUMP.getIngredient(tier)) - .inputItems(CraftingComponent.CABLE.getIngredient(tier), 4) + .inputItems(GTCraftingComponents.EMITTER.get(tier)) + .inputItems(GTCraftingComponents.PUMP.get(tier)) + .inputItems(GTCraftingComponents.CABLE.get(tier), 4) .circuitMeta(1) .outputItems(hatch) .duration(300).EUt(VA[tier]).save(provider); @@ -681,9 +676,9 @@ private static void registerLaserRecipes(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder(GTValues.VN[tier].toLowerCase() + "_1024a_laser_target_hatch") .inputItems(HULL[tier]) .inputItems(lens, Diamond, 2) - .inputItems(CraftingComponent.SENSOR.getIngredient(tier), 2) - .inputItems(CraftingComponent.PUMP.getIngredient(tier), 2) - .inputItems(CraftingComponent.CABLE_DOUBLE.getIngredient(tier), 4) + .inputItems(GTCraftingComponents.SENSOR.get(tier), 2) + .inputItems(GTCraftingComponents.PUMP.get(tier), 2) + .inputItems(GTCraftingComponents.CABLE_DOUBLE.get(tier), 4) .circuitMeta(2) .outputItems(hatch) .duration(600).EUt(VA[tier]).save(provider); @@ -697,9 +692,9 @@ private static void registerLaserRecipes(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder(GTValues.VN[tier].toLowerCase() + "_1024a_laser_source_hatch") .inputItems(HULL[tier]) .inputItems(lens, Diamond, 2) - .inputItems(CraftingComponent.EMITTER.getIngredient(tier), 2) - .inputItems(CraftingComponent.PUMP.getIngredient(tier), 2) - .inputItems(CraftingComponent.CABLE_DOUBLE.getIngredient(tier), 4) + .inputItems(GTCraftingComponents.EMITTER.get(tier), 2) + .inputItems(GTCraftingComponents.PUMP.get(tier), 2) + .inputItems(GTCraftingComponents.CABLE_DOUBLE.get(tier), 4) .circuitMeta(2) .outputItems(hatch) .duration(600).EUt(VA[tier]).save(provider); @@ -713,9 +708,9 @@ private static void registerLaserRecipes(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder(GTValues.VN[tier].toLowerCase() + "_4096a_laser_target_hatch") .inputItems(HULL[tier]) .inputItems(lens, Diamond, 4) - .inputItems(CraftingComponent.SENSOR.getIngredient(tier), 4) - .inputItems(CraftingComponent.PUMP.getIngredient(tier), 4) - .inputItems(CraftingComponent.CABLE_QUAD.getIngredient(tier), 4) + .inputItems(GTCraftingComponents.SENSOR.get(tier), 4) + .inputItems(GTCraftingComponents.PUMP.get(tier), 4) + .inputItems(GTCraftingComponents.CABLE_QUAD.get(tier), 4) .circuitMeta(3) .outputItems(hatch) .duration(1200).EUt(VA[tier]).save(provider); @@ -729,9 +724,9 @@ private static void registerLaserRecipes(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder(GTValues.VN[tier].toLowerCase() + "_4096a_laser_output_hatch") .inputItems(HULL[tier]) .inputItems(lens, Diamond, 4) - .inputItems(CraftingComponent.EMITTER.getIngredient(tier), 4) - .inputItems(CraftingComponent.PUMP.getIngredient(tier), 4) - .inputItems(CraftingComponent.CABLE_QUAD.getIngredient(tier), 4) + .inputItems(GTCraftingComponents.EMITTER.get(tier), 4) + .inputItems(GTCraftingComponents.PUMP.get(tier), 4) + .inputItems(GTCraftingComponents.CABLE_QUAD.get(tier), 4) .circuitMeta(3) .outputItems(hatch) .duration(1200).EUt(VA[tier]).save(provider); diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/alloyblast/AlloyBlastRecipeProducer.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/alloyblast/AlloyBlastRecipeProducer.java index cbfa89fe1e..6a71439928 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/alloyblast/AlloyBlastRecipeProducer.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/alloyblast/AlloyBlastRecipeProducer.java @@ -13,7 +13,6 @@ import com.gregtechceu.gtceu.common.data.GTItems; import com.gregtechceu.gtceu.common.data.GTMaterials; import com.gregtechceu.gtceu.common.data.GTRecipeTypes; -import com.gregtechceu.gtceu.data.recipe.CraftingComponent; import com.gregtechceu.gtceu.data.recipe.builder.GTRecipeBuilder; import com.gregtechceu.gtceu.utils.GTUtil; @@ -26,6 +25,7 @@ import java.util.function.Consumer; import static com.gregtechceu.gtceu.api.data.tag.TagPrefix.ingotHot; +import static com.gregtechceu.gtceu.common.data.GTRecipes.EBF_GASES; public class AlloyBlastRecipeProducer { @@ -136,7 +136,7 @@ protected void buildRecipes(@NotNull BlastProperty property, @NotNull Fluid molt // build the gas recipe if it exists if (property.getGasTier() != null) { GTRecipeBuilder builderGas = builder.copy(builder.id.getPath() + "_gas"); - FluidIngredient gas = CraftingComponent.EBF_GASES.get(property.getGasTier()).copy(); + FluidIngredient gas = EBF_GASES.get(property.getGasTier()).copy(); gas.setAmount(gas.getAmount() * outputAmount); builderGas.circuitMeta(getGasCircuitNum(componentAmount)) .inputFluids(gas) diff --git a/src/main/java/com/gregtechceu/gtceu/integration/kjs/GregTechKubeJSPlugin.java b/src/main/java/com/gregtechceu/gtceu/integration/kjs/GregTechKubeJSPlugin.java index 5dd0615793..72915266b3 100644 --- a/src/main/java/com/gregtechceu/gtceu/integration/kjs/GregTechKubeJSPlugin.java +++ b/src/main/java/com/gregtechceu/gtceu/integration/kjs/GregTechKubeJSPlugin.java @@ -56,6 +56,7 @@ import com.gregtechceu.gtceu.common.machine.multiblock.primitive.PrimitiveFancyUIWorkableMachine; import com.gregtechceu.gtceu.common.unification.material.MaterialRegistryManager; import com.gregtechceu.gtceu.data.recipe.CraftingComponent; +import com.gregtechceu.gtceu.data.recipe.GTCraftingComponents; import com.gregtechceu.gtceu.data.recipe.builder.GTRecipeBuilder; import com.gregtechceu.gtceu.integration.kjs.builders.*; import com.gregtechceu.gtceu.integration.kjs.builders.block.CoilBlockBuilder; @@ -275,6 +276,7 @@ public void registerBindings(BindingsEvent event) { event.add("ChanceLogic", ChanceLogic.class); event.add("CleanroomType", CleanroomType.class); event.add("CraftingComponent", CraftingComponent.class); + event.add("GTCraftingComponents", GTCraftingComponents.class); // Sound related event.add("GTSoundEntries", GTSoundEntries.class); event.add("SoundType", SoundType.class); diff --git a/src/main/java/com/gregtechceu/gtceu/integration/kjs/events/CraftingComponentsEventJS.java b/src/main/java/com/gregtechceu/gtceu/integration/kjs/events/CraftingComponentsEventJS.java index 582555b2e9..1a3392b7dd 100644 --- a/src/main/java/com/gregtechceu/gtceu/integration/kjs/events/CraftingComponentsEventJS.java +++ b/src/main/java/com/gregtechceu/gtceu/integration/kjs/events/CraftingComponentsEventJS.java @@ -11,90 +11,104 @@ import dev.latvian.mods.kubejs.event.StartupEventJS; import lombok.NoArgsConstructor; +import java.util.List; import java.util.Map; -import java.util.stream.Collectors; @SuppressWarnings({ "unused", "unchecked" }) @NoArgsConstructor public class CraftingComponentsEventJS extends StartupEventJS { - public void modify(CraftingComponent.Component component, int tier, Object value) { - component.appendIngredients(Map.of(tier, value)); + public void modify(CraftingComponent craftingComponent, int tier, Object value) { + craftingComponent.add(tier, value); } - public void modify(CraftingComponent.Component component, Map map) { - Map newMap = map.entrySet() - .stream() - .map(entry -> Map.entry(entry.getKey().intValue(), entry.getValue())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - component.appendIngredients(newMap); + public void modify(CraftingComponent craftingComponent, Map map) { + for (var val : map.entrySet()) { + craftingComponent.add(val.getKey().intValue(), val.getValue()); + } } - public void modifyItem(CraftingComponent.Component component, int tier, ItemStack item) { - component.appendIngredients(Map.of(tier, item)); + public void modifyItem(CraftingComponent craftingComponent, int tier, ItemStack item) { + craftingComponent.add(tier, item); } - public void modifyItem(CraftingComponent.Component component, Map map) { - Map newMap = map.entrySet() - .stream() - .map(entry -> Map.entry(entry.getKey().intValue(), entry.getValue())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - component.appendIngredients(newMap); + public void modifyItem(CraftingComponent craftingComponent, Map map) { + for (var val : map.entrySet()) { + craftingComponent.add(val.getKey().intValue(), val.getValue()); + } } - public void modifyTag(CraftingComponent.Component component, int tier, ResourceLocation tag) { - component.appendIngredients(Map.of(tier, TagKey.create(Registries.ITEM, tag))); + public void modifyTag(CraftingComponent craftingComponent, int tier, ResourceLocation tag) { + craftingComponent.add(tier, TagKey.create(Registries.ITEM, tag)); } - public void modifyTag(CraftingComponent.Component component, Map map) { - Map newMap = map.entrySet() - .stream() - .map(entry -> Map.entry(entry.getKey().intValue(), TagKey.create(Registries.ITEM, entry.getValue()))) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - component.appendIngredients(newMap); + public void modifyTag(CraftingComponent craftingComponent, Map map) { + for (var val : map.entrySet()) { + craftingComponent.add(val.getKey().intValue(), TagKey.create(Registries.ITEM, val.getValue())); + } } - public void modifyUnificationEntry(CraftingComponent.Component component, int tier, UnificationEntry item) { - component.appendIngredients(Map.of(tier, item)); + public void modifyUnificationEntry(CraftingComponent craftingComponent, int tier, UnificationEntry item) { + craftingComponent.add(tier, item); } - public void modifyUnificationEntry(CraftingComponent.Component component, Map map) { - Map newMap = map.entrySet() - .stream() - .map(entry -> Map.entry(entry.getKey().intValue(), entry.getValue())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - component.appendIngredients(newMap); + public void modifyUnificationEntry(CraftingComponent craftingComponent, Map map) { + for (var val : map.entrySet()) { + craftingComponent.add(val.getKey().intValue(), val.getValue()); + } } - public CraftingComponent.Component create(Map map) { - Map newMap = map.entrySet() - .stream() - .map(entry -> Map.entry(entry.getKey().intValue(), entry.getValue())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - return new CraftingComponent.Component(newMap); + public void setFallbackItem(CraftingComponent craftingComponent, ItemStack stack) { + craftingComponent.setFallback(stack); } - public CraftingComponent.Component createItem(Map map) { - Map newMap = map.entrySet() - .stream() - .map(entry -> Map.entry(entry.getKey().intValue(), entry.getValue())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - return new CraftingComponent.Component(newMap); + public void setFallbackTag(CraftingComponent craftingComponent, ResourceLocation tag) { + craftingComponent.setFallback(TagKey.create(Registries.ITEM, tag)); } - public CraftingComponent.Component createTag(Map map) { - Map newMap = map.entrySet() - .stream() - .map(entry -> Map.entry(entry.getKey().intValue(), TagKey.create(Registries.ITEM, entry.getValue()))) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - return new CraftingComponent.Component(newMap); + public void setFallbackUnificationEntry(CraftingComponent craftingComponent, UnificationEntry unificationEntry) { + craftingComponent.setFallback(unificationEntry); } - public CraftingComponent.Component createUnificationEntry(Map map) { - Map newMap = map.entrySet() - .stream() - .map(entry -> Map.entry(entry.getKey().intValue(), entry.getValue())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - return new CraftingComponent.Component(newMap); + public void removeTier(CraftingComponent craftingComponent, int tier) { + craftingComponent.remove(tier); + } + + public void removeTiers(CraftingComponent craftingComponent, List tiers) { + for (var tier : tiers) { + craftingComponent.remove(tier.intValue()); + } + } + + public CraftingComponent create(Object fallback, Map map) { + var m = new CraftingComponent(fallback); + for (var val : map.entrySet()) { + m.add(val.getKey().intValue(), val.getValue()); + } + return m; + } + + public CraftingComponent createItem(Object fallback, Map map) { + var m = new CraftingComponent(fallback); + for (var val : map.entrySet()) { + m.add(val.getKey().intValue(), val.getValue()); + } + return m; + } + + public CraftingComponent createTag(Object fallback, Map map) { + var m = new CraftingComponent(fallback); + for (var val : map.entrySet()) { + m.add(val.getKey().intValue(), TagKey.create(Registries.ITEM, val.getValue())); + } + return m; + } + + public CraftingComponent createUnificationEntry(Object fallback, Map map) { + var m = new CraftingComponent(fallback); + for (var val : map.entrySet()) { + m.add(val.getKey().intValue(), val.getValue()); + } + return m; } } From 91a295c1f8c1e4045891b5a63ea54ab0a86a8836 Mon Sep 17 00:00:00 2001 From: kross <135918757+krossgg@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:09:10 -0500 Subject: [PATCH 2/2] cherry-pick fix --- .../com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java index 35d89977f3..fed70a8733 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/GTCraftingComponents.java @@ -754,7 +754,7 @@ public static void initializeComponents() { .add(UHV, new UnificationEntry(TagPrefix.spring, GTMaterials.Europium)); MinecraftForge.EVENT_BUS.post(new CraftingComponentModificationEvent()); - if (GTCEu.isKubeJSLoaded()) { + if (GTCEu.Mods.isKubeJSLoaded()) { KJSCallWrapper.craftingComponentModification(); } }