From aaea9ab2ef1bb29b702be2aacd72b17bdc85a119 Mon Sep 17 00:00:00 2001 From: YoungOnion <39562198+YoungOnionMC@users.noreply.github.com> Date: Fri, 15 Nov 2024 02:05:24 -0700 Subject: [PATCH] Add and tweak various Recipe Categories (#2346) --- .../resources/assets/gtceu/lang/en_ud.json | 5 +++ .../resources/assets/gtceu/lang/en_us.json | 5 +++ .../gtceu/common/data/GTRecipeCategories.java | 15 +++++++ .../gregtechceu/gtceu/data/lang/ItemLang.java | 5 +++ .../data/recipe/builder/GTRecipeBuilder.java | 1 + .../generated/MaterialRecipeHandler.java | 5 +++ .../recipe/generated/OreRecipeHandler.java | 13 ++++++ .../recipe/generated/PartsRecipeHandler.java | 3 ++ .../data/recipe/misc/DecorationRecipes.java | 5 +++ .../data/recipe/misc/MiscRecipeLoader.java | 40 +++++-------------- .../data/recipe/misc/RecyclingRecipes.java | 16 ++++++-- .../recipe/misc/VanillaStandardRecipes.java | 17 ++++++++ 12 files changed, 96 insertions(+), 34 deletions(-) diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index f94e8bad55..2aebf95240 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -3860,8 +3860,13 @@ "gtceu.pyrolyse_oven": "uǝʌO ǝsʎןoɹʎԀ", "gtceu.recipe.amperage": "%s :ǝbɐɹǝdɯⱯ", "gtceu.recipe.category.arc_furnace_recycling": "buıddɐɹɔS ɐɯsɐןԀ", + "gtceu.recipe.category.chem_dyes": "buıǝʎᗡ ןɐɔıɯǝɥƆ", "gtceu.recipe.category.extractor_recycling": "buıʇןǝɯǝᴚ dɐɹɔS", + "gtceu.recipe.category.ingot_molding": "buıpןoW ןɐʇǝW", "gtceu.recipe.category.macerator_recycling": "buıpuıɹ⅁ ʇɹɐԀ", + "gtceu.recipe.category.ore_bathing": "buıʇɐǝɹ⟘ ǝɹO", + "gtceu.recipe.category.ore_crushing": "buıpuıɹ⅁ ǝɹO", + "gtceu.recipe.category.ore_forging": "buıɥsnɹƆ ǝɹO", "gtceu.recipe.chance": "ɹǝıʇ/%s+ %s :ǝɔuɐɥƆ", "gtceu.recipe.cleanroom": "%s sǝɹınbǝᴚ", "gtceu.recipe.cleanroom.display_name": "ɯooɹuɐǝןƆ", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 1409f27bb3..022713a7c3 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -3860,8 +3860,13 @@ "gtceu.pyrolyse_oven": "Pyrolyse Oven", "gtceu.recipe.amperage": "Amperage: %s", "gtceu.recipe.category.arc_furnace_recycling": "Plasma Scrapping", + "gtceu.recipe.category.chem_dyes": "Chemical Dyeing", "gtceu.recipe.category.extractor_recycling": "Scrap Remelting", + "gtceu.recipe.category.ingot_molding": "Metal Molding", "gtceu.recipe.category.macerator_recycling": "Part Grinding", + "gtceu.recipe.category.ore_bathing": "Ore Treating", + "gtceu.recipe.category.ore_crushing": "Ore Grinding", + "gtceu.recipe.category.ore_forging": "Ore Crushing", "gtceu.recipe.chance": "Chance: %s +%s/tier", "gtceu.recipe.cleanroom": "Requires %s", "gtceu.recipe.cleanroom.display_name": "Cleanroom", diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeCategories.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeCategories.java index 4d6ccbf4dc..d1bd59a432 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeCategories.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeCategories.java @@ -25,6 +25,21 @@ public class GTRecipeCategories { .of(GTCEu.MOD_ID, "extractor_recycling", GTRecipeTypes.EXTRACTOR_RECIPES) .setIcon(GuiTextures.EXTRACTOR_RECYCLING_CATEGORY); + public static final GTRecipeCategory ORE_CRUSHING = GTRecipeCategory + .of(GTCEu.MOD_ID, "ore_crushing", GTRecipeTypes.MACERATOR_RECIPES); + + public static final GTRecipeCategory ORE_FORGING = GTRecipeCategory + .of(GTCEu.MOD_ID, "ore_forging", GTRecipeTypes.FORGE_HAMMER_RECIPES); + + public static final GTRecipeCategory ORE_BATHING = GTRecipeCategory + .of(GTCEu.MOD_ID, "ore_bathing", GTRecipeTypes.CHEMICAL_BATH_RECIPES); + + public static final GTRecipeCategory CHEM_DYES = GTRecipeCategory + .of(GTCEu.MOD_ID, "chem_dyes", GTRecipeTypes.CHEMICAL_BATH_RECIPES); + + public static final GTRecipeCategory INGOT_MOLDING = GTRecipeCategory + .of(GTCEu.MOD_ID, "ingot_molding", GTRecipeTypes.ALLOY_SMELTER_RECIPES); + public static void init() { GTRegistries.RECIPE_CATEGORIES.remove(DUMMY.getResourceLocation()); ModLoader.get().postEvent(new GTCEuAPI.RegisterEvent<>(GTRegistries.RECIPE_CATEGORIES, GTRecipeCategory.class)); diff --git a/src/main/java/com/gregtechceu/gtceu/data/lang/ItemLang.java b/src/main/java/com/gregtechceu/gtceu/data/lang/ItemLang.java index 8786089a28..129245e379 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/lang/ItemLang.java +++ b/src/main/java/com/gregtechceu/gtceu/data/lang/ItemLang.java @@ -27,6 +27,11 @@ private static void initGeneratedNames(RegistrateLangProvider provider) { provider.add("gtceu.recipe.category.arc_furnace_recycling", "Plasma Scrapping"); provider.add("gtceu.recipe.category.macerator_recycling", "Part Grinding"); provider.add("gtceu.recipe.category.extractor_recycling", "Scrap Remelting"); + provider.add("gtceu.recipe.category.ore_crushing", "Ore Grinding"); + provider.add("gtceu.recipe.category.ore_forging", "Ore Crushing"); + provider.add("gtceu.recipe.category.ore_bathing", "Ore Treating"); + provider.add("gtceu.recipe.category.chem_dyes", "Chemical Dyeing"); + provider.add("gtceu.recipe.category.ingot_molding", "Metal Molding"); // TagPrefix for (TagPrefix tagPrefix : TagPrefix.values()) { diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder.java index b208b075c1..e47693de3a 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder.java @@ -158,6 +158,7 @@ public GTRecipeBuilder copy(ResourceLocation id) { copy.chance = this.chance; copy.perTick = this.perTick; copy.isFuel = this.isFuel; + copy.recipeCategory = this.recipeCategory; copy.uiName = this.uiName; copy.slotName = this.slotName; copy.onSave = this.onSave; 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 7bec5f6163..b146a969ba 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 @@ -14,6 +14,7 @@ import com.gregtechceu.gtceu.common.data.GTBlocks; import com.gregtechceu.gtceu.common.data.GTItems; import com.gregtechceu.gtceu.common.data.GTMaterials; +import com.gregtechceu.gtceu.common.data.GTRecipeCategories; import com.gregtechceu.gtceu.config.ConfigHolder; import com.gregtechceu.gtceu.data.recipe.CraftingComponent; import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; @@ -336,6 +337,7 @@ public static void processIngot(TagPrefix ingotPrefix, Material material, IngotP .inputItems(ingot, material) .notConsumable(GTItems.SHAPE_MOLD_NUGGET) .outputItems(nugget, material, 9) + .category(GTRecipeCategories.INGOT_MOLDING) .save(provider); if (!ChemicalHelper.get(block, material).isEmpty()) { @@ -344,6 +346,7 @@ public static void processIngot(TagPrefix ingotPrefix, Material material, IngotP .inputItems(block, material) .notConsumable(GTItems.SHAPE_MOLD_INGOT) .outputItems(ingot, material, (int) (block.getMaterialAmount(material) / M)) + .category(GTRecipeCategories.INGOT_MOLDING) .save(provider); COMPRESSOR_RECIPES.recipeBuilder("compress_" + material.getName() + "_to_block") @@ -472,6 +475,7 @@ public static void processNugget(TagPrefix orePrefix, Material material, DustPro .inputItems(nugget, material, 9) .notConsumable(GTItems.SHAPE_MOLD_INGOT) .outputItems(ingot, material) + .category(GTRecipeCategories.INGOT_MOLDING) .save(provider); if (material.hasFluid()) { @@ -588,6 +592,7 @@ public static void processBlock(TagPrefix blockPrefix, Material material, DustPr .notConsumable(GTItems.SHAPE_MOLD_BLOCK) .outputItems(blockStack) .duration(5).EUt(4L * voltageMultiplier) + .category(GTRecipeCategories.INGOT_MOLDING) .save(provider); } else if (material.hasProperty(PropertyKey.GEM)) { COMPRESSOR_RECIPES.recipeBuilder("compress_" + material.getName() + "_gem_to_block") diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java index cd3fc22be4..ab640bd160 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java @@ -9,6 +9,7 @@ import com.gregtechceu.gtceu.api.data.chemical.material.stack.UnificationEntry; import com.gregtechceu.gtceu.api.data.tag.TagPrefix; import com.gregtechceu.gtceu.common.data.GTMaterials; +import com.gregtechceu.gtceu.common.data.GTRecipeCategories; import com.gregtechceu.gtceu.config.ConfigHolder; import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; import com.gregtechceu.gtceu.data.recipe.builder.GTRecipeBuilder; @@ -77,6 +78,7 @@ public static void processOreForgeHammer(TagPrefix orePrefix, Material material, GTRecipeBuilder builder = FORGE_HAMMER_RECIPES .recipeBuilder("hammer_" + prefixString + material.getName() + "_ore_to_raw_ore") .inputItems(orePrefix, material) + .category(GTRecipeCategories.ORE_FORGING) .duration(10).EUt(16); if (material.hasProperty(PropertyKey.GEM) && !gem.isIgnored(material)) { builder.outputItems(GTUtil.copyAmount(amountOfCrushedOre * oreTypeMultiplier, @@ -117,6 +119,7 @@ public static void processOre(TagPrefix orePrefix, Material material, OrePropert .outputItems(GTUtil.copyAmount(amountOfCrushedOre * 2 * oreTypeMultiplier, crushedStack)) .chancedOutput(byproductStack, 1400, 850) .EUt(2) + .category(GTRecipeCategories.ORE_CRUSHING) .duration(400); for (MaterialStack secondaryMaterial : orePrefix.secondaryMaterials()) { @@ -167,6 +170,7 @@ public static void processRawOre(TagPrefix orePrefix, Material material, OreProp GTRecipeBuilder builder = FORGE_HAMMER_RECIPES .recipeBuilder("hammer_" + orePrefix.name + "_" + material.getName() + "_to_crushed_ore") .inputItems(orePrefix, material) + .category(GTRecipeCategories.ORE_FORGING) .duration(10).EUt(16); if (material.hasProperty(PropertyKey.GEM) && !gem.isIgnored(material)) { builder.outputItems(ChemicalHelper.get(gem, material, crushedStack.getCount())); @@ -179,6 +183,7 @@ public static void processRawOre(TagPrefix orePrefix, Material material, OreProp .recipeBuilder("macerate_" + orePrefix.name + "_" + material.getName() + "_ore_to_crushed_ore") .inputItems(orePrefix, material) .outputItems(GTUtil.copyAmount(crushedStack.getCount() * 2, crushedStack)) + .category(GTRecipeCategories.ORE_CRUSHING) .EUt(2) .duration(400); @@ -231,6 +236,7 @@ public static void processRawOre(TagPrefix orePrefix, Material material, OreProp FORGE_HAMMER_RECIPES.recipeBuilder("decompress_" + material.getName() + "_to_raw_ore") .inputItems(rawOreBlock, material) .outputItems(rawOre, material, 9) + .category(GTRecipeCategories.ORE_FORGING) .duration(300).EUt(2).save(provider); } @@ -243,6 +249,7 @@ public static void processCrushedOre(TagPrefix crushedPrefix, Material material, .inputItems(crushedPrefix, material) .outputItems(impureDustStack) .duration(10).EUt(16) + .category(GTRecipeCategories.ORE_FORGING) .save(provider); MACERATOR_RECIPES.recipeBuilder("macerate_" + material.getName() + "_crushed_ore_to_impure_dust") @@ -251,6 +258,7 @@ public static void processCrushedOre(TagPrefix crushedPrefix, Material material, .duration(400).EUt(2) .chancedOutput(ChemicalHelper.get(dust, byproductMaterial, property.getByProductMultiplier()), 1400, 850) + .category(GTRecipeCategories.ORE_CRUSHING) .save(provider); ItemStack crushedPurifiedOre = GTUtil.copy( @@ -305,6 +313,7 @@ public static void processCrushedOre(TagPrefix crushedPrefix, Material material, 580) .chancedOutput(ChemicalHelper.get(dust, Stone), 4000, 650) .duration(200).EUt(VA[LV]) + .category(GTRecipeCategories.ORE_BATHING) .save(provider); } @@ -324,6 +333,7 @@ public static void processCrushedCentrifuged(TagPrefix centrifugedPrefix, Materi .inputItems(centrifugedPrefix, material) .outputItems(dustStack) .duration(10).EUt(16) + .category(GTRecipeCategories.ORE_FORGING) .save(provider); MACERATOR_RECIPES.recipeBuilder("macerate_" + material.getName() + "_refined_ore_to_dust") @@ -331,6 +341,7 @@ public static void processCrushedCentrifuged(TagPrefix centrifugedPrefix, Materi .outputItems(dustStack) .chancedOutput(byproductStack, 1400, 850) .duration(400).EUt(2) + .category(GTRecipeCategories.ORE_CRUSHING) .save(provider); VanillaRecipeHelper.addShapelessRecipe(provider, @@ -353,6 +364,7 @@ public static void processCrushedPurified(TagPrefix purifiedPrefix, Material mat .outputItems(dustStack) .duration(10) .EUt(16) + .category(GTRecipeCategories.ORE_FORGING) .save(provider); MACERATOR_RECIPES.recipeBuilder("macerate_" + material.getName() + "_crushed_ore_to_dust") @@ -360,6 +372,7 @@ public static void processCrushedPurified(TagPrefix purifiedPrefix, Material mat .outputItems(dustStack) .chancedOutput(byproductStack, 1400, 850) .duration(400).EUt(2) + .category(GTRecipeCategories.ORE_CRUSHING) .save(provider); VanillaRecipeHelper.addShapelessRecipe(provider, String.format("purified_ore_to_dust_%s", material.getName()), diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/PartsRecipeHandler.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/PartsRecipeHandler.java index b846c07bbb..1e5b971327 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/PartsRecipeHandler.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/PartsRecipeHandler.java @@ -7,6 +7,7 @@ import com.gregtechceu.gtceu.api.data.tag.TagPrefix; import com.gregtechceu.gtceu.common.data.GTItems; import com.gregtechceu.gtceu.common.data.GTMaterials; +import com.gregtechceu.gtceu.common.data.GTRecipeCategories; import com.gregtechceu.gtceu.common.item.TurbineRotorBehaviour; import com.gregtechceu.gtceu.config.ConfigHolder; import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; @@ -185,6 +186,7 @@ public static void processGear(TagPrefix gearPrefix, Material material, DustProp .outputItems(gearPrefix, material) .duration((int) material.getMass() * 10) .EUt(2L * voltageMultiplier) + .category(GTRecipeCategories.INGOT_MOLDING) .save(provider); if (material.hasFlag(NO_SMASHING)) { @@ -229,6 +231,7 @@ public static void processGear(TagPrefix gearPrefix, Material material, DustProp .inputItems(ingot, material, 2) .notConsumable(GTItems.SHAPE_MOLD_GEAR_SMALL) .outputItems(gearSmall, material) + .category(GTRecipeCategories.INGOT_MOLDING) .save(provider); if (material.hasFlag(NO_SMASHING)) { diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/DecorationRecipes.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/DecorationRecipes.java index 92fb3cbd8b..2b2bc2705d 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/DecorationRecipes.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/DecorationRecipes.java @@ -1,5 +1,7 @@ package com.gregtechceu.gtceu.data.recipe.misc; +import com.gregtechceu.gtceu.common.data.GTRecipeCategories; + import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.world.item.DyeColor; @@ -61,6 +63,7 @@ private static void dyeRecipes(Consumer provider) { .inputFluids(CHEMICAL_DYES[i].getFluid(9)) .outputItems(METAL_SHEETS.get(color)) .EUt(2).duration(10) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("large_metal_sheet_%s".formatted(colorName)) @@ -68,6 +71,7 @@ private static void dyeRecipes(Consumer provider) { .inputFluids(CHEMICAL_DYES[i].getFluid(9)) .outputItems(LARGE_METAL_SHEETS.get(color)) .EUt(2).duration(10) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("studs_%s".formatted(colorName)) @@ -75,6 +79,7 @@ private static void dyeRecipes(Consumer provider) { .inputFluids(CHEMICAL_DYES[i].getFluid(9)) .outputItems(STUDS.get(color)) .EUt(2).duration(10) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); } } diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MiscRecipeLoader.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MiscRecipeLoader.java index a795de95f8..130026ea31 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MiscRecipeLoader.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MiscRecipeLoader.java @@ -4,6 +4,7 @@ import com.gregtechceu.gtceu.api.data.chemical.material.MarkerMaterials.Color; import com.gregtechceu.gtceu.api.data.chemical.material.stack.UnificationEntry; import com.gregtechceu.gtceu.common.data.GTBlocks; +import com.gregtechceu.gtceu.common.data.GTRecipeCategories; import com.gregtechceu.gtceu.config.ConfigHolder; import com.gregtechceu.gtceu.data.recipe.CustomTags; import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; @@ -401,41 +402,18 @@ public static void init(Consumer provider) { // Dyed Lens Recipes GTRecipeBuilder builder = CHEMICAL_BATH_RECIPES.recipeBuilder("").EUt(VA[HV]).duration(200).inputItems(lens, - Glass); + Glass).category(GTRecipeCategories.CHEM_DYES); final int dyeAmount = 288; + // skip white lens + for (int i = 1; i < CHEMICAL_DYES.length; i++) { + builder.copy(CHEMICAL_DYES[i].getName() + "_lens").inputFluids(CHEMICAL_DYES[i].getFluid(dyeAmount)) + .outputItems(GLASS_LENSES.get(Color.VALUES[i])) + .save(provider); + } + builder.copy("colorless_lens").inputFluids(DyeWhite.getFluid(dyeAmount)).outputItems(lens, Glass) .save(provider); - builder.copy("orange_lens").inputFluids(DyeOrange.getFluid(dyeAmount)) - .outputItems(GLASS_LENSES.get(Color.Orange)).save(provider); - builder.copy("magenta_lens").inputFluids(DyeMagenta.getFluid(dyeAmount)) - .outputItems(GLASS_LENSES.get(Color.Magenta)).save(provider); - builder.copy("light_blue_lens").inputFluids(DyeLightBlue.getFluid(dyeAmount)) - .outputItems(GLASS_LENSES.get(Color.LightBlue)).save(provider); - builder.copy("yellow_lens").inputFluids(DyeYellow.getFluid(dyeAmount)) - .outputItems(GLASS_LENSES.get(Color.Yellow)).save(provider); - builder.copy("lime_lens").inputFluids(DyeLime.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Lime)) - .save(provider); - builder.copy("pink_lens").inputFluids(DyePink.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Pink)) - .save(provider); - builder.copy("gray_lens").inputFluids(DyeGray.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Gray)) - .save(provider); - builder.copy("light_gray_lens").inputFluids(DyeLightGray.getFluid(dyeAmount)) - .outputItems(GLASS_LENSES.get(Color.LightGray)).save(provider); - builder.copy("cyan_lens").inputFluids(DyeCyan.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Cyan)) - .save(provider); - builder.copy("purple_lens").inputFluids(DyePurple.getFluid(dyeAmount)) - .outputItems(GLASS_LENSES.get(Color.Purple)).save(provider); - builder.copy("blue_lens").inputFluids(DyeBlue.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Blue)) - .save(provider); - builder.copy("brown_lens").inputFluids(DyeBrown.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Brown)) - .save(provider); - builder.copy("green_lens").inputFluids(DyeGreen.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Green)) - .save(provider); - builder.copy("red_lens").inputFluids(DyeRed.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Red)) - .save(provider); - builder.copy("black_lens").inputFluids(DyeBlack.getFluid(dyeAmount)).outputItems(GLASS_LENSES.get(Color.Black)) - .save(provider); // NAN Certificate EXTRUDER_RECIPES.recipeBuilder("nan_certificate") diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/RecyclingRecipes.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/RecyclingRecipes.java index 084beb7417..17f6b10327 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/RecyclingRecipes.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/RecyclingRecipes.java @@ -126,13 +126,23 @@ private static void registerMaceratorRecycling(Consumer provider GTRecipeBuilder builder = GTRecipeTypes.MACERATOR_RECIPES.recipeBuilder("macerate_" + itemPath.getPath()) .outputItems(outputs.toArray(ItemStack[]::new)) .duration(calculateDuration(outputs)) - .EUt(2L * multiplier) - .category(GTRecipeCategories.MACERATOR_RECYCLING); + .EUt(2L * multiplier); + if (inputTag == null) { builder.inputItems(input.copy()); } else { builder.inputItems(inputTag); } + + boolean recycle = true; + if (entry != null && entry.tagPrefix == TagPrefix.ingot) { + recycle = false; + } + + if (recycle) { + builder.category(GTRecipeCategories.MACERATOR_RECYCLING); + } + builder.save(provider); } @@ -305,7 +315,7 @@ private static boolean needsRecyclingCategory(@Nullable TagPrefix prefix, @Nulla UnificationEntry entry = ChemicalHelper.getUnificationEntry(outputs.get(0).getItem()); if (entry != null && inputStack != null) { Material mat = inputStack.material(); - if (mat.hasFlag(IS_MAGNETIC) && mat.hasProperty(PropertyKey.INGOT)) { + if (!mat.hasFlag(IS_MAGNETIC) && mat.hasProperty(PropertyKey.INGOT)) { return mat.getProperty(PropertyKey.INGOT).getArcSmeltingInto() != entry.material; } } diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/VanillaStandardRecipes.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/VanillaStandardRecipes.java index fb048047fb..f389f9978c 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/VanillaStandardRecipes.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/misc/VanillaStandardRecipes.java @@ -5,6 +5,7 @@ import com.gregtechceu.gtceu.api.data.tag.TagPrefix; import com.gregtechceu.gtceu.api.recipe.ingredient.FluidContainerIngredient; import com.gregtechceu.gtceu.common.data.GTMaterials; +import com.gregtechceu.gtceu.common.data.GTRecipeCategories; import com.gregtechceu.gtceu.config.ConfigHolder; import com.gregtechceu.gtceu.data.recipe.CustomTags; import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; @@ -548,6 +549,7 @@ private static void dyingCleaningRecipes(Consumer provider) { BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_concrete_powder")))) .inputFluids(Water.getFluid(1000)) .outputItems(new ItemStack(BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_concrete")))) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); if (color != DyeColor.WHITE) { @@ -556,6 +558,7 @@ private static void dyingCleaningRecipes(Consumer provider) { .inputFluids(CHEMICAL_DYES[color.ordinal()].getFluid(L / 8)) .outputItems( new ItemStack(BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_concrete")))) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); } @@ -564,6 +567,7 @@ private static void dyingCleaningRecipes(Consumer provider) { .inputFluids(CHEMICAL_DYES[color.ordinal()].getFluid(L / 8)) .outputItems( new ItemStack(BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_terracotta")))) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("dye_glass_to_" + dyeName).duration(20).EUt(VA[ULV]) @@ -571,6 +575,7 @@ private static void dyingCleaningRecipes(Consumer provider) { .inputFluids(CHEMICAL_DYES[color.ordinal()].getFluid(L / 8)) .outputItems( new ItemStack(BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_stained_glass")))) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("dye_glass_pane_to_" + dyeName).duration(20).EUt(VA[ULV]) @@ -578,6 +583,7 @@ private static void dyingCleaningRecipes(Consumer provider) { .inputFluids(CHEMICAL_DYES[color.ordinal()].getFluid(L / 8)) .outputItems(new ItemStack( BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_stained_glass_pane")))) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); CUTTER_RECIPES.recipeBuilder("cut_" + dyeName + "_glass_to_pane").duration(20).EUt(VA[ULV]) @@ -590,6 +596,7 @@ private static void dyingCleaningRecipes(Consumer provider) { .inputFluids(CHEMICAL_DYES[color.ordinal()].getFluid(L / 8)) .outputItems(new ItemStack( BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_candle")))) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); if (color != DyeColor.WHITE) { @@ -597,12 +604,14 @@ private static void dyingCleaningRecipes(Consumer provider) { .inputItems(new ItemStack(Blocks.WHITE_WOOL)) .inputFluids(CHEMICAL_DYES[color.ordinal()].getFluid(L)) .outputItems(new ItemStack(BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_wool")))) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("dye_bed_to_" + dyeName).duration(20).EUt(VA[ULV]) .inputItems(new ItemStack(Blocks.WHITE_BED)) .inputFluids(CHEMICAL_DYES[color.ordinal()].getFluid(L)) .outputItems(new ItemStack(BuiltInRegistries.ITEM.get(new ResourceLocation(dyeName + "_bed")))) + .category(GTRecipeCategories.CHEM_DYES) .save(provider); } @@ -625,36 +634,42 @@ private static void dyingCleaningRecipes(Consumer provider) { .inputItems(ItemTags.WOOL) .inputFluids(Chlorine.getFluid(50)) .outputItems(new ItemStack(Blocks.WHITE_WOOL)) + .category(GTRecipeCategories.CHEM_DYES) .duration(400).EUt(2).save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("decolor_carpet") .inputItems(ItemTags.WOOL_CARPETS) .inputFluids(Chlorine.getFluid(25)) .outputItems(new ItemStack(Blocks.WHITE_CARPET)) + .category(GTRecipeCategories.CHEM_DYES) .duration(400).EUt(2).save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("decolor_terracotta") .inputItems(ItemTags.TERRACOTTA) .inputFluids(Chlorine.getFluid(50)) .outputItems(Items.TERRACOTTA) + .category(GTRecipeCategories.CHEM_DYES) .duration(400).EUt(2).save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("decolor_stained_glass") .inputItems(Tags.Items.STAINED_GLASS) .inputFluids(Chlorine.getFluid(50)) .outputItems(Items.GLASS) + .category(GTRecipeCategories.CHEM_DYES) .duration(400).EUt(2).save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("decolor_stained_glass_pane") .inputItems(Tags.Items.STAINED_GLASS_PANES) .inputFluids(Chlorine.getFluid(20)) .outputItems(Items.GLASS_PANE) + .category(GTRecipeCategories.CHEM_DYES) .duration(400).EUt(2).save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("decolor_concrete") .inputItems(CustomTags.CONCRETE_ITEM) .inputFluids(Chlorine.getFluid(20)) .outputItems(Items.WHITE_CONCRETE) + .category(GTRecipeCategories.CHEM_DYES) .duration(400).EUt(2).save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("sticky_piston_to_piston") @@ -667,12 +682,14 @@ private static void dyingCleaningRecipes(Consumer provider) { .inputItems(ItemTags.CANDLES) .inputFluids(Chlorine.getFluid(20)) .outputItems(Items.CANDLE) + .category(GTRecipeCategories.CHEM_DYES) .duration(400).EUt(2).save(provider); CHEMICAL_BATH_RECIPES.recipeBuilder("decolor_bed") .inputItems(ItemTags.BEDS) .inputFluids(Chlorine.getFluid(20)) .outputItems(Items.WHITE_BED) + .category(GTRecipeCategories.CHEM_DYES) .duration(400).EUt(2).save(provider); }