diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java index a539067e937..e41409fd51f 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java @@ -171,13 +171,6 @@ protected Collection doAdd(GT_RecipeBuilder builder) { Iterable recipes = properties.recipeEmitter.apply(builder); Collection ret = new ArrayList<>(); for (GT_Recipe recipe : recipes) { - if (properties.recipeConfigCategory != null) { - assert properties.recipeConfigKeyConvertor != null; - String configKey = properties.recipeConfigKeyConvertor.apply(recipe); - if (configKey != null && recipe.mDuration <= 0) { - continue; - } - } if (recipe.mFluidInputs.length < properties.minFluidInputs || recipe.mInputs.length < properties.minItemInputs) { return Collections.emptyList(); diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java b/src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java index 7262b794ab2..0cd08279a73 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java @@ -52,16 +52,10 @@ static RecipeMapBackendPropertiesBuilder builder() { @Nullable public final Function recipeTransformer; - @Nullable - public final String recipeConfigCategory; - @Nullable - public final Function recipeConfigKeyConvertor; - RecipeMapBackendProperties(int minItemInputs, int minFluidInputs, boolean specialSlotSensitive, boolean disableOptimize, Function> recipeEmitter, - @Nullable Function recipeTransformer, - @Nullable String recipeConfigCategory, @Nullable Function recipeConfigKeyConvertor) { + @Nullable Function recipeTransformer) { if (minItemInputs < 0 || minFluidInputs < 0) { throw new IllegalArgumentException("minItemInputs and minFluidInputs cannot be negative"); } @@ -71,7 +65,5 @@ static RecipeMapBackendPropertiesBuilder builder() { this.disableOptimize = disableOptimize; this.recipeEmitter = recipeEmitter; this.recipeTransformer = recipeTransformer; - this.recipeConfigCategory = recipeConfigCategory; - this.recipeConfigKeyConvertor = recipeConfigKeyConvertor; } } diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java b/src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java index 933ea1b06ba..48a27fa42ec 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java @@ -33,11 +33,6 @@ public final class RecipeMapBackendPropertiesBuilder { @Nullable private Function recipeTransformer; - @Nullable - private String recipeConfigCategory; - @Nullable - private Function recipeConfigKeyConvertor; - RecipeMapBackendPropertiesBuilder() {} RecipeMapBackendProperties build() { @@ -47,9 +42,7 @@ RecipeMapBackendProperties build() { specialSlotSensitive, disableOptimize, recipeEmitter, - recipeTransformer, - recipeConfigCategory, - recipeConfigKeyConvertor); + recipeTransformer); } public RecipeMapBackendPropertiesBuilder minItemInputs(int minItemInputs) { @@ -97,13 +90,6 @@ public RecipeMapBackendPropertiesBuilder chainRecipeTransformer( return this; } - public RecipeMapBackendPropertiesBuilder recipeConfigFile(String category, - Function keyConvertor) { - this.recipeConfigCategory = category; - this.recipeConfigKeyConvertor = keyConvertor; - return this; - } - private Iterable defaultBuildRecipe(GT_RecipeBuilder builder) { // TODO sensible validation GT_RecipeBuilder b = builder; diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBuilder.java b/src/main/java/gregtech/api/recipe/RecipeMapBuilder.java index 86590189348..a1638a5a340 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBuilder.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBuilder.java @@ -11,8 +11,6 @@ import javax.annotation.ParametersAreNonnullByDefault; -import org.apache.commons.lang3.StringUtils; - import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.UITexture; @@ -211,12 +209,6 @@ public RecipeMapBuilder chainRecipeTransformer(Consumer recipeTran return chainRecipeTransformer(withIdentityReturn(recipeTransformer)); } - public RecipeMapBuilder recipeConfigFile(String category, Function keyConvertor) { - if (StringUtils.isBlank(category)) throw new IllegalArgumentException(); - backendPropertiesBuilder.recipeConfigFile(category, keyConvertor); - return this; - } - // endregion // region frontend UI properties diff --git a/src/main/java/gregtech/api/recipe/RecipeMaps.java b/src/main/java/gregtech/api/recipe/RecipeMaps.java index ff60504e8dd..2c05eb0e081 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMaps.java +++ b/src/main/java/gregtech/api/recipe/RecipeMaps.java @@ -5,13 +5,6 @@ import static gregtech.api.enums.Mods.Railcraft; import static gregtech.api.util.GT_RecipeConstants.ADDITIVE_AMOUNT; import static gregtech.api.util.GT_RecipeConstants.FUEL_VALUE; -import static gregtech.api.util.GT_RecipeMapUtil.FIRST_FLUIDSTACK_INPUT; -import static gregtech.api.util.GT_RecipeMapUtil.FIRST_FLUIDSTACK_OUTPUT; -import static gregtech.api.util.GT_RecipeMapUtil.FIRST_FLUID_OUTPUT; -import static gregtech.api.util.GT_RecipeMapUtil.FIRST_ITEM_INPUT; -import static gregtech.api.util.GT_RecipeMapUtil.FIRST_ITEM_OR_FLUID_INPUT; -import static gregtech.api.util.GT_RecipeMapUtil.FIRST_ITEM_OR_FLUID_OUTPUT; -import static gregtech.api.util.GT_RecipeMapUtil.FIRST_ITEM_OUTPUT; import static gregtech.api.util.GT_RecipeMapUtil.GT_RecipeTemplate; import static gregtech.api.util.GT_RecipeMapUtil.asTemplate; import static gregtech.api.util.GT_RecipeMapUtil.buildOrEmpty; @@ -72,7 +65,6 @@ import gregtech.api.recipe.maps.UnpackagerBackend; import gregtech.api.recipe.metadata.PCBFactoryTierKey; import gregtech.api.recipe.metadata.PurificationPlantBaseChanceKey; -import gregtech.api.util.GT_Config; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; @@ -105,7 +97,6 @@ public final class RecipeMaps { } }) .progressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW) - .recipeConfigFile("orewasher", FIRST_ITEM_INPUT) .build(); public static final RecipeMap thermalCentrifugeRecipes = RecipeMapBuilder .of("gt.recipe.thermalcentrifuge") @@ -122,7 +113,6 @@ public final class RecipeMaps { return GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE; } }) - .recipeConfigFile("thermalcentrifuge", FIRST_ITEM_INPUT) .build(); public static final RecipeMap compressorRecipes = RecipeMapBuilder.of("gt.recipe.compressor") .maxIO(1, 1, 0, 0) @@ -137,7 +127,6 @@ public final class RecipeMaps { .progressBarSteam(GT_UITextures.PROGRESSBAR_COMPRESS_STEAM) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_Compressor.get(1))) - .recipeConfigFile("compressor", FIRST_ITEM_INPUT) .build(); public static final RecipeMap extractorRecipes = RecipeMapBuilder.of("gt.recipe.extractor") .maxIO(1, 1, 0, 0) @@ -152,7 +141,6 @@ public final class RecipeMaps { .progressBarSteam(GT_UITextures.PROGRESSBAR_EXTRACT_STEAM) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_Extractor.get(1))) - .recipeConfigFile("extractor", FIRST_ITEM_INPUT) .build(); public static final RecipeMap recyclerRecipes = RecipeMapBuilder .of("ic.recipe.recycler", RecyclerBackend::new) @@ -249,7 +237,6 @@ public final class RecipeMaps { .of("gt.recipe.plasmaarcfurnace") .maxIO(1, 9, 1, 1) .minInputs(1, 1) - .recipeConfigFile("arcfurnace", FIRST_ITEM_INPUT) .build(); /** * Usually, but not always, you should use {@link GT_RecipeConstants#UniversalArcFurnace} instead. @@ -258,7 +245,6 @@ public final class RecipeMaps { .maxIO(1, 9, 1, 0) .minInputs(1, 1) .amperage(3) - .recipeConfigFile("arcfurnace", FIRST_ITEM_INPUT) .build(); public static final RecipeMap printerRecipes = RecipeMapBuilder .of("gt.recipe.printer", PrinterBackend::new) @@ -277,12 +263,10 @@ public final class RecipeMaps { } return GT_UITextures.OVERLAY_SLOT_PAGE_BLANK; }) - .recipeConfigFile("printer", FIRST_ITEM_INPUT) .build(); public static final RecipeMap sifterRecipes = RecipeMapBuilder.of("gt.recipe.sifter") .maxIO(1, 9, 1, 1) .progressBar(GT_UITextures.PROGRESSBAR_SIFT, ProgressBar.Direction.DOWN) - .recipeConfigFile("sifter", FIRST_ITEM_INPUT) .build(); public static final RecipeMap formingPressRecipes = RecipeMapBuilder .of("gt.recipe.press", FormingPressBackend::new) @@ -298,7 +282,6 @@ public final class RecipeMaps { return GT_UITextures.OVERLAY_SLOT_PRESS_2; }) .progressBar(GT_UITextures.PROGRESSBAR_COMPRESS) - .recipeConfigFile("press", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap laserEngraverRecipes = RecipeMapBuilder .of("gt.recipe.laserengraver") @@ -322,14 +305,12 @@ public final class RecipeMaps { } return a.compareTo(b); }) - .recipeConfigFile("laserengraving", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap mixerRecipes = RecipeMapBuilder.of("gt.recipe.mixer") .maxIO(9, 4, 1, 1) .minInputs(1, 0) .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isFluid ? GT_UITextures.OVERLAY_SLOT_DUST : null) .progressBar(GT_UITextures.PROGRESSBAR_MIXER, ProgressBar.Direction.CIRCULAR_CW) - .recipeConfigFile("mixer", FIRST_ITEM_OR_FLUID_OUTPUT) .build(); public static final RecipeMap autoclaveRecipes = RecipeMapBuilder.of("gt.recipe.autoclave") .maxIO(2, 4, 1, 1) @@ -346,8 +327,6 @@ public final class RecipeMaps { } return GT_UITextures.OVERLAY_SLOT_DUST; }) - - .recipeConfigFile("autoclave", FIRST_ITEM_INPUT) .build(); public static final RecipeMap electroMagneticSeparatorRecipes = RecipeMapBuilder .of("gt.recipe.electromagneticseparator") @@ -357,13 +336,11 @@ public final class RecipeMaps { (index, isFluid, isOutput, isSpecial) -> isOutput ? GT_UITextures.OVERLAY_SLOT_DUST : GT_UITextures.OVERLAY_SLOT_CRUSHED_ORE) .progressBar(GT_UITextures.PROGRESSBAR_MAGNET) - .recipeConfigFile("electromagneticseparator", FIRST_ITEM_INPUT) .build(); public static final RecipeMap polarizerRecipes = RecipeMapBuilder.of("gt.recipe.polarizer") .maxIO(1, 1, 0, 0) .minInputs(1, 0) .progressBar(GT_UITextures.PROGRESSBAR_MAGNET) - .recipeConfigFile("polarizer", FIRST_ITEM_INPUT) .build(); public static final RecipeMap maceratorRecipes = RecipeMapBuilder.of("gt.recipe.macerator") .maxIO(1, 4, 0, 0) @@ -378,13 +355,11 @@ public final class RecipeMaps { .progressBarSteam(GT_UITextures.PROGRESSBAR_MACERATE_STEAM) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_Macerator.get(1))) - .recipeConfigFile("pulveriser", FIRST_ITEM_INPUT) .build(); public static final RecipeMap chemicalBathRecipes = RecipeMapBuilder.of("gt.recipe.chemicalbath") .maxIO(1, 3, 1, 1) .minInputs(1, 1) .progressBar(GT_UITextures.PROGRESSBAR_BATH, ProgressBar.Direction.CIRCULAR_CW) - .recipeConfigFile("chemicalbath", FIRST_ITEM_INPUT) .build(); public static final RecipeMap fluidCannerRecipes = RecipeMapBuilder .of("gt.recipe.fluidcanner", FluidCannerBackend::new) @@ -392,7 +367,6 @@ public final class RecipeMaps { .minInputs(1, 0) .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isFluid ? GT_UITextures.OVERLAY_SLOT_CANISTER : null) .progressBar(GT_UITextures.PROGRESSBAR_CANNER) - .recipeConfigFile("canning", FIRST_ITEM_INPUT) .build(); public static final RecipeMap brewingRecipes = RecipeMapBuilder.of("gt.recipe.brewer") .maxIO(1, 0, 1, 1) @@ -400,7 +374,6 @@ public final class RecipeMaps { .slotOverlays( (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_CAULDRON : null) .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) - .recipeConfigFile("brewing", FIRST_FLUIDSTACK_OUTPUT) .build(); public static final RecipeMap fluidHeaterRecipes = RecipeMapBuilder.of("gt.recipe.fluidheater") .maxIO(1, 0, 1, 1) @@ -414,7 +387,6 @@ public final class RecipeMaps { return GT_UITextures.OVERLAY_SLOT_HEATER_1; }) .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) - .recipeConfigFile("fluidheater", FIRST_FLUIDSTACK_OUTPUT) .build(); public static final RecipeMap distilleryRecipes = RecipeMapBuilder.of("gt.recipe.distillery") .maxIO(1, 1, 1, 1) @@ -469,13 +441,11 @@ public final class RecipeMaps { r.mDuration = aDuration; } }) - .recipeConfigFile("distillery", FIRST_FLUIDSTACK_OUTPUT) .build(); public static final RecipeMap fermentingRecipes = RecipeMapBuilder.of("gt.recipe.fermenter") .maxIO(0, 0, 1, 1) .minInputs(0, 1) .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) - .recipeConfigFile("fermenting", FIRST_FLUIDSTACK_OUTPUT) .build(); public static final RecipeMap fluidSolidifierRecipes = RecipeMapBuilder .of("gt.recipe.fluidsolidifier") @@ -493,7 +463,6 @@ else if (Materials.PhasedIron.getMolten(1) r.mFluidInputs = new FluidStack[] { Materials.PulsatingIron.getMolten(r.mFluidInputs[0].amount) }; } }) - .recipeConfigFile("fluidsolidifier", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap fluidExtractionRecipes = RecipeMapBuilder .of("gt.recipe.fluidextractor") @@ -513,7 +482,6 @@ else if (Materials.PhasedIron.getMolten(1) r.mFluidOutputs = new FluidStack[] { Materials.PulsatingIron.getMolten(r.mFluidOutputs[0].amount) }; } }) - .recipeConfigFile("fluidextractor", FIRST_ITEM_INPUT) .build(); public static final RecipeMap packagerRecipes = RecipeMapBuilder.of("gt.recipe.packager") .maxIO(2, 1, 0, 0) @@ -527,14 +495,12 @@ else if (Materials.PhasedIron.getMolten(1) } return null; }) - .recipeConfigFile("boxing", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap unpackagerRecipes = RecipeMapBuilder .of("gt.recipe.unpackager", UnpackagerBackend::new) .maxIO(1, 2, 0, 0) .minInputs(1, 0) .slotOverlays((index, isFluid, isOutput, isSpecial) -> !isOutput ? GT_UITextures.OVERLAY_SLOT_BOXED : null) - .recipeConfigFile("unboxing", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap fusionRecipes = RecipeMapBuilder.of("gt.recipe.fusionreactor") .maxIO(0, 0, 2, 1) @@ -548,7 +514,6 @@ else if (Materials.PhasedIron.getMolten(1) recipe -> FusionSpecialValueFormatter.getFusionTier(recipe.mSpecialValue, recipe.mEUt)) .thenComparing(GT_Recipe::compareTo)) .frontend(FluidOnlyFrontend::new) - .recipeConfigFile("fusion", FIRST_FLUID_OUTPUT) .build(); public static final RecipeMap centrifugeRecipes = RecipeMapBuilder.of("gt.recipe.centrifuge") .maxIO(2, 6, 1, 1) @@ -566,7 +531,6 @@ else if (Materials.PhasedIron.getMolten(1) } }) .progressBar(GT_UITextures.PROGRESSBAR_EXTRACT) - .recipeConfigFile("centrifuge", FIRST_ITEM_OR_FLUID_INPUT) .build(); public static final RecipeMap electrolyzerRecipes = RecipeMapBuilder.of("gt.recipe.electrolyzer") .maxIO(2, 6, 1, 1) @@ -584,7 +548,6 @@ else if (Materials.PhasedIron.getMolten(1) } }) .progressBar(GT_UITextures.PROGRESSBAR_EXTRACT) - .recipeConfigFile("electrolyzer", FIRST_ITEM_OR_FLUID_INPUT) .build(); /** * Use {@link GT_RecipeConstants#COIL_HEAT} as heat level. @@ -593,7 +556,6 @@ else if (Materials.PhasedIron.getMolten(1) .maxIO(6, 6, 1, 1) .minInputs(1, 0) .neiSpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE) - .recipeConfigFile("blastfurnace", FIRST_ITEM_INPUT) .build(); /** * Use {@link GT_RecipeConstants#COIL_HEAT} as heat level. @@ -710,7 +672,6 @@ else if (Materials.PhasedIron.getMolten(1) } return coll.getAll(); }) - .recipeConfigFile("primitiveblastfurnace", FIRST_ITEM_INPUT) .build(); /** * Uses {@link GT_RecipeConstants#ADDITIVE_AMOUNT} for TNT/ITNT/... amount. Value is truncated to [0, 64] @@ -766,7 +727,6 @@ else if (Materials.PhasedIron.getMolten(1) .setInputs(input, GT_ModHandler.getIC2Item("industrialTnt", tITNT, null)); return coll.getAll(); }) - .recipeConfigFile("implosion", FIRST_ITEM_INPUT) .build(); public static final RecipeMap vacuumFreezerRecipes = RecipeMapBuilder .of("gt.recipe.vacuumfreezer") @@ -792,7 +752,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) } return buildOrEmpty(b); }) - .recipeConfigFile("vacuumfreezer", FIRST_ITEM_INPUT) .build(); /** * Using {@code .addTo(chemicalReactorRecipes)} will cause the recipe to be added to single block recipe map ONLY! @@ -820,7 +779,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) }) .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) .disableOptimize() - .recipeConfigFile("chemicalreactor", FIRST_ITEM_OR_FLUID_OUTPUT) .build(); /** * Using {@code .addTo(multiblockChemicalReactorRecipes)} will cause the recipe to be added to @@ -850,20 +808,17 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) .logoPos(80, 62) .frontend(DistillationTowerFrontend::new) .disableOptimize() - .recipeConfigFile("distillation", FIRST_FLUIDSTACK_INPUT) .build(); public static final RecipeMap crackingRecipes = RecipeMapBuilder .of("gt.recipe.craker", OilCrackerBackend::new) .maxIO(1, 1, 2, 1) .minInputs(1, 2) .progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE) - .recipeConfigFile("cracking", FIRST_FLUIDSTACK_INPUT) .build(); public static final RecipeMap pyrolyseRecipes = RecipeMapBuilder.of("gt.recipe.pyro") .maxIO(2, 1, 1, 1) .minInputs(1, 0) .disableOptimize() - .recipeConfigFile("pyrolyse", FIRST_ITEM_INPUT) .build(); public static final RecipeMap wiremillRecipes = RecipeMapBuilder.of("gt.recipe.wiremill") .maxIO(2, 1, 0, 0) @@ -871,7 +826,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) .slotOverlays( (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_WIREMILL : null) .progressBar(GT_UITextures.PROGRESSBAR_WIREMILL) - .recipeConfigFile("wiremill", FIRST_ITEM_INPUT) .build(); public static final RecipeMap benderRecipes = RecipeMapBuilder.of("gt.recipe.metalbender") .maxIO(2, 1, 0, 0) @@ -879,7 +833,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) .slotOverlays( (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_BENDER : null) .progressBar(GT_UITextures.PROGRESSBAR_BENDING) - .recipeConfigFile("bender", FIRST_ITEM_INPUT) .build(); public static final RecipeMap alloySmelterRecipes = RecipeMapBuilder.of("gt.recipe.alloysmelter") .maxIO(2, 1, 0, 0) @@ -903,9 +856,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) }) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_AlloySmelter.get(1))) - .recipeConfigFile( - "alloysmelting", - r -> GT_Config.getStackConfigName(GT_Utility.isArrayOfLength(r.mInputs, 1) ? r.mInputs[0] : r.mOutputs[0])) .build(); public static final RecipeMap assemblerRecipes = RecipeMapBuilder .of("gt.recipe.assembler", AssemblerBackend::new) @@ -915,7 +865,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_CIRCUIT : null) .progressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE) .disableOptimize() - .recipeConfigFile("assembling", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap circuitAssemblerRecipes = RecipeMapBuilder .of("gt.recipe.circuitassembler") @@ -925,7 +874,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput ? GT_UITextures.OVERLAY_SLOT_CIRCUIT : null) .progressBar(GT_UITextures.PROGRESSBAR_CIRCUIT_ASSEMBLER) .unificateOutputNEI(!NEICustomDiagrams.isModLoaded()) - .recipeConfigFile("circuitassembler", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap cannerRecipes = RecipeMapBuilder.of("gt.recipe.canner") .maxIO(2, 2, 0, 0) @@ -940,7 +888,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) return GT_UITextures.OVERLAY_SLOT_CANISTER; }) .progressBar(GT_UITextures.PROGRESSBAR_CANNER) - .recipeConfigFile("canning", FIRST_ITEM_INPUT) .build(); public static final RecipeMap latheRecipes = RecipeMapBuilder.of("gt.recipe.lathe") .maxIO(1, 2, 0, 0) @@ -956,7 +903,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) }) .progressBar(GT_UITextures.PROGRESSBAR_LATHE) .addSpecialTexture(98, 24, 5, 18, GT_UITextures.PROGRESSBAR_LATHE_BASE) - .recipeConfigFile("lathe", FIRST_ITEM_INPUT) .build(); public static final RecipeMap cutterRecipes = RecipeMapBuilder.of("gt.recipe.cuttingsaw") .maxIO(2, 4, 1, 0) @@ -998,7 +944,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) .ifPresent(ret::add); return ret; }) - .recipeConfigFile("cutting", FIRST_ITEM_INPUT) .build(); public static final RecipeMap slicerRecipes = RecipeMapBuilder.of("gt.recipe.slicer") .maxIO(2, 1, 0, 0) @@ -1013,7 +958,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) return GT_UITextures.OVERLAY_SLOT_SLICE_SHAPE; }) .progressBar(GT_UITextures.PROGRESSBAR_SLICE) - .recipeConfigFile("slicer", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap extruderRecipes = RecipeMapBuilder.of("gt.recipe.extruder") .maxIO(2, 1, 0, 0) @@ -1022,7 +966,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) (index, isFluid, isOutput, isSpecial) -> !isFluid && !isOutput && index != 0 ? GT_UITextures.OVERLAY_SLOT_EXTRUDER_SHAPE : null) .progressBar(GT_UITextures.PROGRESSBAR_EXTRUDE) - .recipeConfigFile("extruder", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap hammerRecipes = RecipeMapBuilder.of("gt.recipe.hammer") .maxIO(2, 2, 2, 2) @@ -1037,7 +980,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) .addSpecialTextureSteam(78, 42, 20, 6, GT_UITextures.PROGRESSBAR_HAMMER_BASE_STEAM) // Avoid steam machine being used as handler icon .neiHandlerInfo(builder -> builder.setDisplayStack(ItemList.Machine_LV_Hammer.get(1))) - .recipeConfigFile("forgehammer", FIRST_ITEM_OUTPUT) .build(); public static final RecipeMap amplifierRecipes = RecipeMapBuilder.of("gt.recipe.uuamplifier") .maxIO(1, 0, 0, 1) @@ -1052,7 +994,6 @@ && isArrayEmptyOrNull(b.getFluidOutputs()) return null; }) .progressBar(GT_UITextures.PROGRESSBAR_EXTRACT) - .recipeConfigFile("amplifier", FIRST_ITEM_INPUT) .build(); public static final RecipeMap massFabFakeRecipes = RecipeMapBuilder.of("gt.recipe.massfab") .maxIO(1, 0, 1, 1) diff --git a/src/main/java/gregtech/api/util/GT_RecipeMapUtil.java b/src/main/java/gregtech/api/util/GT_RecipeMapUtil.java index 3e97b56f840..67d50188fe5 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeMapUtil.java +++ b/src/main/java/gregtech/api/util/GT_RecipeMapUtil.java @@ -1,8 +1,6 @@ package gregtech.api.util; import static gregtech.api.enums.Mods.GregTech; -import static gregtech.api.util.GT_Config.getStackConfigName; -import static gregtech.api.util.GT_Utility.isArrayEmptyOrNull; import java.util.ArrayList; import java.util.Arrays; @@ -39,32 +37,6 @@ public class GT_RecipeMapUtil { return r; }; - public static final Function FIRST_FLUID_INPUT = r -> isArrayEmptyOrNull(r.mFluidInputs) ? null - : r.mFluidInputs[0].getFluid() - .getName(); - public static final Function FIRST_FLUID_OUTPUT = r -> isArrayEmptyOrNull(r.mFluidInputs) ? null - : r.mFluidOutputs[0].getFluid() - .getName(); - public static final Function FIRST_FLUIDSTACK_INPUT = r -> isArrayEmptyOrNull(r.mFluidInputs) - ? null - : r.mFluidInputs[0].getUnlocalizedName(); - public static final Function FIRST_FLUIDSTACK_OUTPUT = r -> isArrayEmptyOrNull(r.mFluidOutputs) - ? null - : r.mFluidOutputs[0].getUnlocalizedName(); - public static final Function FIRST_ITEM_INPUT = r -> isArrayEmptyOrNull(r.mInputs) ? null - : getStackConfigName(r.mInputs[0]); - public static final Function FIRST_ITEM_OUTPUT = r -> isArrayEmptyOrNull(r.mOutputs) ? null - : getStackConfigName(r.mOutputs[0]); - public static final Function FIRST_ITEM_OR_FLUID_INPUT = r -> isArrayEmptyOrNull(r.mInputs) - ? isArrayEmptyOrNull(r.mFluidInputs) ? null - : r.mFluidInputs[0].getFluid() - .getName() - : getStackConfigName(r.mInputs[0]); - public static final Function FIRST_ITEM_OR_FLUID_OUTPUT = r -> isArrayEmptyOrNull(r.mOutputs) - ? isArrayEmptyOrNull(r.mFluidOutputs) ? null - : r.mFluidOutputs[0].getFluid() - .getName() - : getStackConfigName(r.mOutputs[0]); private static final Map addonRecipeMaps = new HashMap<>(); private static final Multimap> delayedActions = ArrayListMultimap.create();