From ebbea42812d7383db82c1da557a735cc344f6db0 Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Tue, 12 Mar 2024 00:37:40 +0100 Subject: [PATCH] Allow crafting of quartz fixtures from cable anchors to replace iron ingots --- .../quartz_fixture_from_anchors.json | 34 +++++++++++++++++++ .../quartz_fixture_from_anchors.json | 19 +++++++++++ .../recipes/DecorationBlockRecipes.java | 8 +++++ 3 files changed, 61 insertions(+) create mode 100644 src/generated/resources/data/ae2/advancements/recipes/misc/decorative/quartz_fixture_from_anchors.json create mode 100644 src/generated/resources/data/ae2/recipes/decorative/quartz_fixture_from_anchors.json diff --git a/src/generated/resources/data/ae2/advancements/recipes/misc/decorative/quartz_fixture_from_anchors.json b/src/generated/resources/data/ae2/advancements/recipes/misc/decorative/quartz_fixture_from_anchors.json new file mode 100644 index 00000000000..0b6e8c78acb --- /dev/null +++ b/src/generated/resources/data/ae2/advancements/recipes/misc/decorative/quartz_fixture_from_anchors.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_charged_certus_quartz_crystal": { + "conditions": { + "items": [ + { + "items": [ + "ae2:charged_certus_quartz_crystal" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "ae2:decorative/quartz_fixture_from_anchors" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_charged_certus_quartz_crystal" + ] + ], + "rewards": { + "recipes": [ + "ae2:decorative/quartz_fixture_from_anchors" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ae2/recipes/decorative/quartz_fixture_from_anchors.json b/src/generated/resources/data/ae2/recipes/decorative/quartz_fixture_from_anchors.json new file mode 100644 index 00000000000..49c1db8e963 --- /dev/null +++ b/src/generated/resources/data/ae2/recipes/decorative/quartz_fixture_from_anchors.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "a": { + "item": "ae2:charged_certus_quartz_crystal" + }, + "b": { + "item": "ae2:cable_anchor" + } + }, + "pattern": [ + "ab" + ], + "result": { + "count": 2, + "item": "ae2:quartz_fixture" + } +} \ No newline at end of file diff --git a/src/main/java/appeng/datagen/providers/recipes/DecorationBlockRecipes.java b/src/main/java/appeng/datagen/providers/recipes/DecorationBlockRecipes.java index 6bf291b2dad..13fe38150ec 100644 --- a/src/main/java/appeng/datagen/providers/recipes/DecorationBlockRecipes.java +++ b/src/main/java/appeng/datagen/providers/recipes/DecorationBlockRecipes.java @@ -20,6 +20,7 @@ import static appeng.datagen.providers.recipes.RecipeCriteria.criterionName; +import appeng.core.definitions.AEParts; import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.data.recipes.RecipeOutput; @@ -141,6 +142,13 @@ public void buildRecipes(RecipeOutput consumer) { .unlockedBy(criterionName(AEItems.CERTUS_QUARTZ_CRYSTAL_CHARGED), has(AEItems.CERTUS_QUARTZ_CRYSTAL_CHARGED)) .save(consumer, AppEng.makeId("decorative/quartz_fixture")); + ShapedRecipeBuilder.shaped(RecipeCategory.MISC, AEBlocks.QUARTZ_FIXTURE, 2) + .pattern("ab") + .define('a', AEItems.CERTUS_QUARTZ_CRYSTAL_CHARGED) + .define('b', AEParts.CABLE_ANCHOR) + .unlockedBy(criterionName(AEItems.CERTUS_QUARTZ_CRYSTAL_CHARGED), + has(AEItems.CERTUS_QUARTZ_CRYSTAL_CHARGED)) + .save(consumer, AppEng.makeId("decorative/quartz_fixture_from_anchors")); ShapedRecipeBuilder.shaped(RecipeCategory.MISC, AEBlocks.QUARTZ_GLASS, 4) .pattern("aba")