diff --git a/beet-dev.yaml b/beet-dev.yaml index 7e8acefe6f..b11adf3a73 100644 --- a/beet-dev.yaml +++ b/beet-dev.yaml @@ -7,7 +7,7 @@ pipeline: - gm4.plugins.output - gm4.plugins.player_heads - gm4.plugins.resource_pack - - gm4.plugins.attribute_rewrite + - gm4.plugins.backwards - beet.contrib.model_merging - beet.contrib.optifine - beet.contrib.babelbox diff --git a/beet-release.yaml b/beet-release.yaml index b368fec4e6..8e85fffcab 100644 --- a/beet-release.yaml +++ b/beet-release.yaml @@ -39,7 +39,7 @@ pipeline: - gm4.plugins.manifest.update_patch - gm4.plugins.player_heads - gm4.plugins.resource_pack - - gm4.plugins.attribute_rewrite + - gm4.plugins.backwards - beet.contrib.model_merging - beet.contrib.optifine - beet.contrib.babelbox diff --git a/beet-test.yaml b/beet-test.yaml index c63d04505e..5707fe4f89 100644 --- a/beet-test.yaml +++ b/beet-test.yaml @@ -9,7 +9,7 @@ pipeline: - gm4.plugins.output.test - gm4.plugins.player_heads - gm4.plugins.resource_pack - - gm4.plugins.attribute_rewrite + - gm4.plugins.backwards - gm4_guidebook.generate_guidebooks.load_page_data - gm4_guidebook.generate_guidebooks.load_custom_recipes - gm4.plugins.test.load_tests diff --git a/gm4/plugins/attribute_rewrite.py b/gm4/plugins/backwards.py similarity index 58% rename from gm4/plugins/attribute_rewrite.py rename to gm4/plugins/backwards.py index e6fca00ce3..1945966af3 100644 --- a/gm4/plugins/attribute_rewrite.py +++ b/gm4/plugins/backwards.py @@ -1,5 +1,17 @@ -from beet import Context, TextFileBase import re +import logging +from typing import Any +from beet import Context, TextFileBase, Recipe + +logger = logging.getLogger("gm4.backwards") + +# Generates overlays to support older versions +def beet_default(ctx: Context): + yield + + rewrite_attributes(ctx) + rewrite_recipes(ctx) + ATTRIBUTES_RENAMES = { "minecraft:armor": "minecraft:generic.armor", @@ -36,9 +48,8 @@ "minecraft:water_movement_efficiency": "minecraft:generic.water_movement_efficiency", } -def beet_default(ctx: Context): - yield - +# Removes the generic. and other prefixes from attribute IDs +def rewrite_attributes(ctx: Context): for id, resource in ctx.data.all(): if isinstance(resource, TextFileBase): resource.source_stop @@ -51,3 +62,50 @@ def beet_default(ctx: Context): overlay = ctx.data.overlays["overlay_48"] overlay.supported_formats = { "min_inclusive": 48, "max_inclusive": 48 } overlay[id] = overlay_resource + + +# Rewrites the recipe ingredients to the old {"item": "..."} format +def rewrite_recipes(ctx: Context): + + def rewrite_ingredient(ingr: str | list[str]) -> Any: + if isinstance(ingr, list): + return [rewrite_ingredient(item) for item in ingr] + if ingr.startswith("#"): + return { "tag": ingr[1:] } + return { "item": ingr } + + def rewrite_recipe(id: str, resource: Recipe): + # If an overlay already exists for this recipe, us the contents of that + # TODO: generalize this for all rewrite functions and handle multiple overlays + for overlay in ctx.data.overlays.values(): + if id in overlay.recipes: + resource = overlay.recipes[id] + break + + overlay_resource = resource.copy() + data = overlay_resource.data + + if "crafting_transmute" in data["type"]: + logger.warning(f"Cannot backport crafting_transmute recipe {id}") + return + + if "base" in data: + data["base"] = rewrite_ingredient(data["base"]) + if "addition" in data: + data["addition"] = rewrite_ingredient(data["addition"]) + if "ingredient" in data: + data["ingredient"] = rewrite_ingredient(data["ingredient"]) + if "ingredients" in data: + data["ingredients"] = [rewrite_ingredient(ingr) for ingr in data["ingredients"]] + if "key" in data: + data["key"] = {k: rewrite_ingredient(ingr) for k, ingr in data["key"].items()} + + overlay = ctx.data.overlays["overlay_48"] + overlay.supported_formats = { "min_inclusive": 48, "max_inclusive": 48 } + overlay[id] = overlay_resource + + for id, resource in ctx.data.recipes.items(): + try: + rewrite_recipe(id, resource) + except BaseException as e: + logger.error(f"Failed to backport recipe {id}: {e}") diff --git a/gm4_block_compressors/data/gm4_block_compressors/advancement/recipes/compressor.json b/gm4_block_compressors/data/gm4_block_compressors/advancement/recipes/compressor.json new file mode 100644 index 0000000000..178c1740d2 --- /dev/null +++ b/gm4_block_compressors/data/gm4_block_compressors/advancement/recipes/compressor.json @@ -0,0 +1,37 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_block_compressors:compressor" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:purpur_block", + "minecraft:purpur_pillar", + "minecraft:piston", + "minecraft:obsidian" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_block_compressors:compressor" + ] + } +} diff --git a/gm4_block_compressors/data/gm4_block_compressors/recipe/compressor.json b/gm4_block_compressors/data/gm4_block_compressors/recipe/compressor.json new file mode 100644 index 0000000000..ff471b4e33 --- /dev/null +++ b/gm4_block_compressors/data/gm4_block_compressors/recipe/compressor.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "IPI", + "pOp", + "CCC" + ], + "key": { + "I": "minecraft:iron_ingot", + "P": "minecraft:purpur_block", + "p": "minecraft:piston", + "O": "minecraft:obsidian", + "C": "minecraft:cobblestone" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "block/block_compressor_full", + "minecraft:profile": "$block_compressor", + "minecraft:custom_data": "{gm4_machines:{id:'block_compressor'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.block_compressor\",\"fallback\":\"Compressor\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_boots_of_ostara/data/gm4_boots_of_ostara/advancement/recipes/boots_of_ostara.json b/gm4_boots_of_ostara/data/gm4_boots_of_ostara/advancement/recipes/boots_of_ostara.json new file mode 100644 index 0000000000..aaa9ee8c31 --- /dev/null +++ b/gm4_boots_of_ostara/data/gm4_boots_of_ostara/advancement/recipes/boots_of_ostara.json @@ -0,0 +1,36 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_boots_of_ostara:boots_of_ostara" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:leather_boots", + "minecraft:moss_block", + "minecraft:grass_block" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_boots_of_ostara:boots_of_ostara" + ] + } +} diff --git a/gm4_boots_of_ostara/data/gm4_boots_of_ostara/recipe/boots_of_ostara.json b/gm4_boots_of_ostara/data/gm4_boots_of_ostara/recipe/boots_of_ostara.json new file mode 100644 index 0000000000..b8983beba9 --- /dev/null +++ b/gm4_boots_of_ostara/data/gm4_boots_of_ostara/recipe/boots_of_ostara.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + " S ", + "MLG", + " W " + ], + "key": { + "S": "minecraft:wheat_seeds", + "M": "minecraft:moss_block", + "L": "minecraft:leather_boots", + "G": "minecraft:grass_block", + "W": "minecraft:water_bucket" + }, + "result": { + "id": "minecraft:leather_boots", + "components": { + "minecraft:dyed_color": { + "rgb": 3705899, + "show_in_tooltip": false + }, + "minecraft:custom_model_data": "item/boots_of_ostara", + "minecraft:custom_data": "{gm4_boots_of_ostara:1b}", + "minecraft:custom_name": "{\"translate\": \"item.gm4.boots_of_ostara\",\"fallback\": \"Boots of Ostara\",\"italic\": false}", + "minecraft:lore": [ + "{\"translate\":\"item.gm4.boots_of_ostara.lore\",\"fallback\":\"Brings abundance beneath you!\",\"color\":\"dark_gray\",\"italic\":false}" + ] + } + } +} diff --git a/gm4_disassemblers/data/gm4_disassemblers/advancement/recipes/disassembler.json b/gm4_disassemblers/data/gm4_disassemblers/advancement/recipes/disassembler.json new file mode 100644 index 0000000000..9a3a7a63a3 --- /dev/null +++ b/gm4_disassemblers/data/gm4_disassemblers/advancement/recipes/disassembler.json @@ -0,0 +1,36 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_disassemblers:disassembler" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:tnt", + "minecraft:stonecutter", + "minecraft:obsidian" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_disassemblers:disassembler" + ] + } +} diff --git a/gm4_disassemblers/data/gm4_disassemblers/recipe/disassembler.json b/gm4_disassemblers/data/gm4_disassemblers/recipe/disassembler.json new file mode 100644 index 0000000000..a56d429d4b --- /dev/null +++ b/gm4_disassemblers/data/gm4_disassemblers/recipe/disassembler.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "ITI", + "OSO", + "CCC" + ], + "key": { + "I": "minecraft:iron_ingot", + "T": "minecraft:tnt", + "O": "minecraft:obsidian", + "S": "minecraft:stonecutter", + "C": "minecraft:cobblestone" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "item/disassembler", + "minecraft:profile": "$disassembler", + "minecraft:custom_data": "{gm4_machines:{id:'disassembler'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.disassembler\",\"fallback\":\"Disassembler\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_enchantment_extractors/data/gm4_enchantment_extractors/advancement/recipes/enchantment_extractor.json b/gm4_enchantment_extractors/data/gm4_enchantment_extractors/advancement/recipes/enchantment_extractor.json new file mode 100644 index 0000000000..00a4ba5833 --- /dev/null +++ b/gm4_enchantment_extractors/data/gm4_enchantment_extractors/advancement/recipes/enchantment_extractor.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_enchantment_extractors:enchantment_extractor" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:enchanting_table", + "minecraft:grindstone" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_enchantment_extractors:enchantment_extractor" + ] + } +} diff --git a/gm4_enchantment_extractors/data/gm4_enchantment_extractors/recipe/enchantment_extractor.json b/gm4_enchantment_extractors/data/gm4_enchantment_extractors/recipe/enchantment_extractor.json new file mode 100644 index 0000000000..e6793dfd6f --- /dev/null +++ b/gm4_enchantment_extractors/data/gm4_enchantment_extractors/recipe/enchantment_extractor.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + " E ", + "GgG", + "CCC" + ], + "key": { + "E": "minecraft:enchanting_table", + "G": "minecraft:gold_ingot", + "g": "minecraft:grindstone", + "C": "minecraft:cobblestone" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "item/enchantment_extractor", + "minecraft:profile": "$enchantment_extractor", + "minecraft:custom_data": "{gm4_machines:{id:'enchantment_extractor'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.enchantment_extractor\",\"fallback\":\"Enchantment Extractor\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_ender_hoppers/data/gm4_ender_hoppers/advancement/recipes/ender_hopper.json b/gm4_ender_hoppers/data/gm4_ender_hoppers/advancement/recipes/ender_hopper.json new file mode 100644 index 0000000000..81f919996b --- /dev/null +++ b/gm4_ender_hoppers/data/gm4_ender_hoppers/advancement/recipes/ender_hopper.json @@ -0,0 +1,44 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_ender_hoppers:ender_hopper" + } + }, + "has_the_minecart_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_ender_hoppers:ender_hopper_minecart" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:ender_eye", + "minecraft:respawn_anchor", + "minecraft:hopper" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_the_minecart_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_ender_hoppers:ender_hopper", + "gm4_ender_hoppers:ender_hopper_minecart" + ] + } +} diff --git a/gm4_ender_hoppers/data/gm4_ender_hoppers/recipe/ender_hopper.json b/gm4_ender_hoppers/data/gm4_ender_hoppers/recipe/ender_hopper.json new file mode 100644 index 0000000000..2ebd3af6ac --- /dev/null +++ b/gm4_ender_hoppers/data/gm4_ender_hoppers/recipe/ender_hopper.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "E", + "R", + "H" + ], + "key": { + "E": "minecraft:ender_eye", + "R": "minecraft:respawn_anchor", + "H": "minecraft:hopper" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "item/ender_hopper", + "minecraft:profile": "$ender_hopper", + "minecraft:custom_data": "{gm4_machines:{id:'ender_hopper'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.ender_hopper\",\"fallback\":\"Ender Hopper\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_ender_hoppers/data/gm4_ender_hoppers/recipe/ender_hopper_minecart.json b/gm4_ender_hoppers/data/gm4_ender_hoppers/recipe/ender_hopper_minecart.json new file mode 100644 index 0000000000..57abfe94bf --- /dev/null +++ b/gm4_ender_hoppers/data/gm4_ender_hoppers/recipe/ender_hopper_minecart.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "E", + "R", + "H" + ], + "key": { + "E": "minecraft:ender_eye", + "R": "minecraft:respawn_anchor", + "H": "minecraft:hopper_minecart" + }, + "result": { + "id": "minecraft:hopper_minecart", + "components": { + "minecraft:custom_model_data": "item/ender_hopper_minecart", + "minecraft:custom_data": "{gm4_machines:{id:'ender_hopper_minecart'}}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.ender_hopper_minecart\",\"fallback\":\"Minecart with Ender Hopper\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_heart_canisters/data/gm4_heart_canisters/advancement/recipes/heart_canister_tier_1.json b/gm4_heart_canisters/data/gm4_heart_canisters/advancement/recipes/heart_canister_tier_1.json new file mode 100644 index 0000000000..ee29f08260 --- /dev/null +++ b/gm4_heart_canisters/data/gm4_heart_canisters/advancement/recipes/heart_canister_tier_1.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_heart_canisters:heart_canister_tier_1" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:nether_star" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_heart_canisters:heart_canister_tier_1" + ] + } +} diff --git a/gm4_heart_canisters/data/gm4_heart_canisters/recipe/heart_canister_tier_1.json b/gm4_heart_canisters/data/gm4_heart_canisters/recipe/heart_canister_tier_1.json new file mode 100644 index 0000000000..a58590df42 --- /dev/null +++ b/gm4_heart_canisters/data/gm4_heart_canisters/recipe/heart_canister_tier_1.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "OIO", + "GNG", + "OGO" + ], + "key": { + "O": "minecraft:obsidian", + "I": "minecraft:iron_ingot", + "G": "minecraft:golden_apple", + "N": "minecraft:nether_star" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "item/heart_canister_tier_1", + "minecraft:profile": "$heart_canister_tier_1", + "minecraft:custom_data": "{gm4_heart_canister:1b,gm4_heart_canister_tier:1b}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.heart_canister\",\"fallback\":\"Heart Canister\",\"italic\":false}", + "minecraft:lore": [ + "{\"translate\":\"item.gm4.heart_canister.lore.tier\",\"fallback\":\"Tier %s\",\"with\":[\"1\"],\"color\":\"gray\",\"italic\":false}" + ] + } + } +} diff --git a/gm4_liquid_minecarts/data/gm4_liquid_minecarts/advancement/recipes/liquid_minecart.json b/gm4_liquid_minecarts/data/gm4_liquid_minecarts/advancement/recipes/liquid_minecart.json new file mode 100644 index 0000000000..68ec5bde2d --- /dev/null +++ b/gm4_liquid_minecarts/data/gm4_liquid_minecarts/advancement/recipes/liquid_minecart.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_liquid_minecarts:liquid_minecart" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:hopper_minecart", + "minecraft:comparator" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_liquid_minecarts:liquid_minecart" + ] + } +} diff --git a/gm4_liquid_minecarts/data/gm4_liquid_minecarts/recipe/liquid_minecart.json b/gm4_liquid_minecarts/data/gm4_liquid_minecarts/recipe/liquid_minecart.json new file mode 100644 index 0000000000..0f97580c11 --- /dev/null +++ b/gm4_liquid_minecarts/data/gm4_liquid_minecarts/recipe/liquid_minecart.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "IGI", + "ICI", + " H " + ], + "key": { + "I": "minecraft:iron_ingot", + "G": "minecraft:glass", + "C": "minecraft:comparator", + "H": "minecraft:hopper_minecart" + }, + "result": { + "id": "minecraft:hopper_minecart", + "components": { + "minecraft:custom_model_data": "item/liquid_minecart", + "minecraft:custom_data": "{gm4_machines:{id:'liquid_minecart'}}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.liquid_minecart\",\"fallback\":\"Minecart with Liquid Tank\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_liquid_tanks/data/gm4_liquid_tanks/advancement/recipes/liquid_tank.json b/gm4_liquid_tanks/data/gm4_liquid_tanks/advancement/recipes/liquid_tank.json new file mode 100644 index 0000000000..2c9fca1586 --- /dev/null +++ b/gm4_liquid_tanks/data/gm4_liquid_tanks/advancement/recipes/liquid_tank.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_liquid_tanks:liquid_tank" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:hopper", + "minecraft:comparator" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_liquid_tanks:liquid_tank" + ] + } +} diff --git a/gm4_liquid_tanks/data/gm4_liquid_tanks/recipe/liquid_tank.json b/gm4_liquid_tanks/data/gm4_liquid_tanks/recipe/liquid_tank.json new file mode 100644 index 0000000000..5b0189271a --- /dev/null +++ b/gm4_liquid_tanks/data/gm4_liquid_tanks/recipe/liquid_tank.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "IGI", + "ICI", + " H " + ], + "key": { + "I": "minecraft:iron_ingot", + "G": "minecraft:glass", + "C": "minecraft:comparator", + "H": "minecraft:hopper" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "item/liquid_tank", + "minecraft:profile": "$liquid_tank", + "minecraft:custom_data": "{gm4_machines:{id:'liquid_tank'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.liquid_tank\",\"fallback\":\"Liquid Tank\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_mountaineering/data/gm4_mountaineering/advancement/recipes/crampons.json b/gm4_mountaineering/data/gm4_mountaineering/advancement/recipes/crampons.json new file mode 100644 index 0000000000..58eded4443 --- /dev/null +++ b/gm4_mountaineering/data/gm4_mountaineering/advancement/recipes/crampons.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_mountaineering:crampons" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:chainmail_boots" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_mountaineering:crampons" + ] + } +} diff --git a/gm4_mountaineering/data/gm4_mountaineering/advancement/recipes/skis.json b/gm4_mountaineering/data/gm4_mountaineering/advancement/recipes/skis.json new file mode 100644 index 0000000000..d38fd96e76 --- /dev/null +++ b/gm4_mountaineering/data/gm4_mountaineering/advancement/recipes/skis.json @@ -0,0 +1,42 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_mountaineering:skis" + } + }, + "has_the_ski_pole_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_mountaineering:ski_pole" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:iron_boots" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_the_ski_pole_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_mountaineering:skis", + "gm4_mountaineering:ski_pole" + ] + } +} diff --git a/gm4_mountaineering/data/gm4_mountaineering/recipe/crampons.json b/gm4_mountaineering/data/gm4_mountaineering/recipe/crampons.json new file mode 100644 index 0000000000..0ebfd6133d --- /dev/null +++ b/gm4_mountaineering/data/gm4_mountaineering/recipe/crampons.json @@ -0,0 +1,36 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + " B ", + "NNN" + ], + "key": { + "B": "minecraft:chainmail_boots", + "N": "minecraft:iron_nugget" + }, + "result": { + "id": "minecraft:chainmail_boots", + "components": { + "minecraft:custom_model_data": "item/crampons", + "minecraft:custom_data": "{gm4_mountaineering:{item:'crampons'}}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.crampons\",\"fallback\":\"Crampons\",\"italic\":false}", + "minecraft:attribute_modifiers": [ + { + "type": "minecraft:movement_speed", + "id": "gm4_mountaineering:crampon_slowness", + "amount": -0.2, + "operation": "add_multiplied_base", + "slot": "feet" + }, + { + "type": "minecraft:armor", + "id": "gm4_mountaineering:crampon_armor", + "amount": 1, + "operation": "add_value", + "slot": "feet" + } + ] + } + } +} diff --git a/gm4_mountaineering/data/gm4_mountaineering/recipe/ski_pole.json b/gm4_mountaineering/data/gm4_mountaineering/recipe/ski_pole.json new file mode 100644 index 0000000000..cc2d34afce --- /dev/null +++ b/gm4_mountaineering/data/gm4_mountaineering/recipe/ski_pole.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "T", + "S", + "S" + ], + "key": { + "T": "minecraft:tripwire_hook", + "S": "minecraft:stick" + }, + "result": { + "id": "minecraft:stick", + "components": { + "minecraft:custom_model_data": "item/poles", + "minecraft:max_stack_size": 1, + "minecraft:custom_data": "{gm4_mountaineering:{item:'poles'}}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.poles\",\"fallback\":\"Ski Pole\",\"italic\":false}" + } + } +} diff --git a/gm4_mountaineering/data/gm4_mountaineering/recipe/skis.json b/gm4_mountaineering/data/gm4_mountaineering/recipe/skis.json new file mode 100644 index 0000000000..2731b0a668 --- /dev/null +++ b/gm4_mountaineering/data/gm4_mountaineering/recipe/skis.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "I I", + "IBI", + "I I" + ], + "key": { + "I": "minecraft:iron_ingot", + "B": "minecraft:iron_boots" + }, + "result": { + "id": "minecraft:iron_boots", + "components": { + "minecraft:custom_model_data": "item/skis", + "minecraft:custom_data": "{gm4_mountaineering:{item:'skis'}}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.skis\",\"fallback\":\"Skis\",\"italic\":false}" + } + } +} diff --git a/gm4_orb_of_ankou/data/gm4_orb_of_ankou/advancement/recipes/orb_of_ankou.json b/gm4_orb_of_ankou/data/gm4_orb_of_ankou/advancement/recipes/orb_of_ankou.json new file mode 100644 index 0000000000..67b02f1da8 --- /dev/null +++ b/gm4_orb_of_ankou/data/gm4_orb_of_ankou/advancement/recipes/orb_of_ankou.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_orb_of_ankou:orb_of_ankou" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:netherite_scrap", + "minecraft:nether_star" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_orb_of_ankou:orb_of_ankou" + ] + } +} diff --git a/gm4_orb_of_ankou/data/gm4_orb_of_ankou/recipe/orb_of_ankou.json b/gm4_orb_of_ankou/data/gm4_orb_of_ankou/recipe/orb_of_ankou.json new file mode 100644 index 0000000000..dc04ac43e3 --- /dev/null +++ b/gm4_orb_of_ankou/data/gm4_orb_of_ankou/recipe/orb_of_ankou.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "NCN", + "CSC", + "NCN" + ], + "key": { + "N": "minecraft:netherite_scrap", + "C": "minecraft:clay_ball", + "S": "minecraft:nether_star" + }, + "result": { + "id": "minecraft:firework_star", + "components": { + "minecraft:enchantment_glint_override": true, + "minecraft:custom_model_data": "item/orb_of_ankou", + "minecraft:hide_additional_tooltip": {}, + "minecraft:firework_explosion": { + "shape": "small_ball", + "colors": [ + 13092807 + ] + }, + "minecraft:custom_data": "{gm4_orb_of_ankou:{item:'orb'}}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.orb_of_ankou\",\"fallback\":\"Orb of Ankou\",\"color\":\"aqua\",\"italic\":false}", + "minecraft:lore": [ + "{\"translate\":\"text.gm4.orb_of_ankou.empty\",\"fallback\":\"Empty\",\"color\":\"gray\"}" + ] + } + } +} diff --git a/gm4_record_crafting/data/gm4/advancement/record_crafting.json b/gm4_record_crafting/data/gm4/advancement/record_crafting.json index 2780394612..67a53b0a73 100644 --- a/gm4_record_crafting/data/gm4/advancement/record_crafting.json +++ b/gm4_record_crafting/data/gm4/advancement/record_crafting.json @@ -18,8 +18,115 @@ }, "parent": "gm4:custom_crafters", "criteria": { - "build_crafter": { - "trigger": "minecraft:impossible" + "craft_music_disc_11": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_11" + } + }, + "craft_music_disc_13": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_13" + } + }, + "craft_music_disc_blocks": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_blocks" + } + }, + "craft_music_disc_cat": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_cat" + } + }, + "craft_music_disc_chirp": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_chirp" + } + }, + "craft_music_disc_far": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_far" + } + }, + "craft_music_disc_mall": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_mall" + } + }, + "craft_music_disc_mellohi": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_mellohi" + } + }, + "craft_music_disc_stal": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_stal" + } + }, + "craft_music_disc_strad": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_strad" + } + }, + "craft_music_disc_wait": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_wait" + } + }, + "craft_music_disc_ward": { + "trigger": "minecraft:recipe_crafted", + "conditions": { + "recipe_id": "gm4_record_crafting:music_disc_ward" + } } - } + }, + "requirements": [ + [ + "craft_music_disc_11" + ], + [ + "craft_music_disc_13" + ], + [ + "craft_music_disc_blocks" + ], + [ + "craft_music_disc_cat" + ], + [ + "craft_music_disc_chirp" + ], + [ + "craft_music_disc_far" + ], + [ + "craft_music_disc_mall" + ], + [ + "craft_music_disc_mellohi" + ], + [ + "craft_music_disc_stal" + ], + [ + "craft_music_disc_strad" + ], + [ + "craft_music_disc_wait" + ], + [ + "craft_music_disc_ward" + ] + ] } diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_11.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_11.json new file mode 100644 index 0000000000..88b4034de2 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_11.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_11" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:coal" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_11" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_13.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_13.json new file mode 100644 index 0000000000..a3597e0885 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_13.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_13" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:yellow_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_13" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_blocks.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_blocks.json new file mode 100644 index 0000000000..f199dbea99 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_blocks.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_blocks" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:orange_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_blocks" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_cat.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_cat.json new file mode 100644 index 0000000000..d17b40b7ad --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_cat.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_cat" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:green_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_cat" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_chirp.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_chirp.json new file mode 100644 index 0000000000..3853fa9d78 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_chirp.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_chirp" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:red_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_chirp" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_far.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_far.json new file mode 100644 index 0000000000..f62a63cbd4 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_far.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_far" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:lime_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_far" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_mall.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_mall.json new file mode 100644 index 0000000000..d79399ab60 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_mall.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_mall" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:purple_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_mall" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_mellohi.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_mellohi.json new file mode 100644 index 0000000000..c52d8cebd6 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_mellohi.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_mellohi" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:magenta_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_mellohi" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_stal.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_stal.json new file mode 100644 index 0000000000..950742e75f --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_stal.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_stal" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:black_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_stal" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_strad.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_strad.json new file mode 100644 index 0000000000..044644b0d1 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_strad.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_strad" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:white_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_strad" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_wait.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_wait.json new file mode 100644 index 0000000000..53096e857f --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_wait.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_wait" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:light_blue_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_wait" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_ward.json b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_ward.json new file mode 100644 index 0000000000..b9bdbe5c59 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/advancement/recipes/music_disc_ward.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_record_crafting:music_disc_ward" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:ender_eye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_record_crafting:music_disc_ward" + ] + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/11.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/11.mcfunction index 846c61ba41..774694977a 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/11.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/11.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/11 -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_11 +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_11 diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/13.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/13.mcfunction index 32d6c3be60..f605fac395 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/13.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/13.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/13 -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_13 +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_13 diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/blocks.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/blocks.mcfunction index 46abdd3280..26d128a5db 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/blocks.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/blocks.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/blocks -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_blocks +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_blocks diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/cat.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/cat.mcfunction index 5a2f57cc8e..1d941ba384 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/cat.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/cat.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/cat -#set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_cat +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_cat diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/chirp.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/chirp.mcfunction index ee34be2aab..8133e178f4 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/chirp.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/chirp.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/chirp -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_chirp +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_chirp diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/far.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/far.mcfunction index bc91b6b484..c42484a572 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/far.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/far.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/far -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_far +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_far diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/mall.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/mall.mcfunction index aa95774b98..3b0881343a 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/mall.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/mall.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/mall -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_mall +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_mall diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/mellohi.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/mellohi.mcfunction index 67969bbfad..4ce5e961db 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/mellohi.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/mellohi.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/mellohi -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_mellohi +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_mellohi diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/stal.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/stal.mcfunction index 45403df3a1..1e2c341aba 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/stal.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/stal.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/stal -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_stal +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_stal diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/strad.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/strad.mcfunction index f512038209..d0ee15c0d8 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/strad.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/strad.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/strad -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_strad +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_strad diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/wait.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/wait.mcfunction index 449788d5d3..1035502c80 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/wait.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/wait.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/wait -# set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_wait +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_wait diff --git a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/ward.mcfunction b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/ward.mcfunction index f01eaa47e7..39fa7cf5c8 100644 --- a/gm4_record_crafting/data/gm4_record_crafting/function/recipes/ward.mcfunction +++ b/gm4_record_crafting/data/gm4_record_crafting/function/recipes/ward.mcfunction @@ -5,5 +5,5 @@ scoreboard players set $crafted gm4_crafting 1 # place disc loot replace block ~ ~ ~ container.0 loot gm4_record_crafting:crafting/ward -#set flags -tag @a[distance=..4,gamemode=!spectator] add gm4_crafted_record_ward +# grant advancement criteria +advancement grant @a[distance=..4,gamemode=!spectator] only gm4:record_crafting craft_music_disc_ward diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_11.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_11.json new file mode 100644 index 0000000000..57572960e5 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_11.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:coal" + }, + "result": { + "id": "minecraft:music_disc_11" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_13.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_13.json new file mode 100644 index 0000000000..91047c7c38 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_13.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:yellow_dye" + }, + "result": { + "id": "minecraft:music_disc_13" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_blocks.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_blocks.json new file mode 100644 index 0000000000..8e50467eb1 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_blocks.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:orange_dye" + }, + "result": { + "id": "minecraft:music_disc_blocks" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_cat.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_cat.json new file mode 100644 index 0000000000..870d955cc1 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_cat.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:green_dye" + }, + "result": { + "id": "minecraft:music_disc_cat" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_chirp.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_chirp.json new file mode 100644 index 0000000000..9e602731a2 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_chirp.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:red_dye" + }, + "result": { + "id": "minecraft:music_disc_chirp" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_far.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_far.json new file mode 100644 index 0000000000..28a074523c --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_far.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:lime_dye" + }, + "result": { + "id": "minecraft:music_disc_far" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_mall.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_mall.json new file mode 100644 index 0000000000..639ad14733 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_mall.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:purple_dye" + }, + "result": { + "id": "minecraft:music_disc_mall" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_mellohi.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_mellohi.json new file mode 100644 index 0000000000..d4f02a6c88 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_mellohi.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:magenta_dye" + }, + "result": { + "id": "minecraft:music_disc_mellohi" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_stal.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_stal.json new file mode 100644 index 0000000000..b217b9148e --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_stal.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:black_dye" + }, + "result": { + "id": "minecraft:music_disc_stal" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_strad.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_strad.json new file mode 100644 index 0000000000..52c8b2acb2 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_strad.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:white_dye" + }, + "result": { + "id": "minecraft:music_disc_strad" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_wait.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_wait.json new file mode 100644 index 0000000000..3e0c6aeec9 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_wait.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:light_blue_dye" + }, + "result": { + "id": "minecraft:music_disc_wait" + } +} diff --git a/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_ward.json b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_ward.json new file mode 100644 index 0000000000..7515244e59 --- /dev/null +++ b/gm4_record_crafting/data/gm4_record_crafting/recipe/music_disc_ward.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "FFF", + "FDF", + "FFF" + ], + "key": { + "F": "minecraft:flint", + "D": "minecraft:ender_eye" + }, + "result": { + "id": "minecraft:music_disc_ward" + } +} diff --git a/gm4_scuba_gear/data/gm4/advancement/scuba_gear.json b/gm4_scuba_gear/data/gm4/advancement/scuba_gear.json index 5f3431aaa5..1498b67dc3 100644 --- a/gm4_scuba_gear/data/gm4/advancement/scuba_gear.json +++ b/gm4_scuba_gear/data/gm4/advancement/scuba_gear.json @@ -19,8 +19,16 @@ }, "parent": "gm4:custom_crafters", "criteria": { - "scuba_gear": { - "trigger": "minecraft:impossible" + "all_gear_equipped": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "player": [ + { + "condition": "minecraft:reference", + "name": "gm4_scuba_gear:all_gear_equipped" + } + ] + } } } } diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/equipped.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/equipped.mcfunction index d24c1ca630..f6eb8a502f 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/function/equipped.mcfunction +++ b/gm4_scuba_gear/data/gm4_scuba_gear/function/equipped.mcfunction @@ -3,6 +3,3 @@ execute if entity @s[tag=!gm4_in_water,predicate=gm4_scuba_gear:tank_equipped] at @s anchored eyes positioned ^ ^ ^ if predicate gm4_scuba_gear:in_water run function gm4_scuba_gear:breathe effect give @s[scores={gm4_sg_swim=1..},predicate=gm4_scuba_gear:flippers_equipped] dolphins_grace 3 0 true - -# reward advancement -advancement grant @s[predicate=gm4_scuba_gear:all_gear_equipped] only gm4:scuba_gear diff --git a/gm4_smelteries/data/gm4_smelteries/advancement/recipes/smeltery.json b/gm4_smelteries/data/gm4_smelteries/advancement/recipes/smeltery.json new file mode 100644 index 0000000000..737c0e7fcc --- /dev/null +++ b/gm4_smelteries/data/gm4_smelteries/advancement/recipes/smeltery.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_smelteries:smeltery" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:furnace" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_smelteries:smeltery" + ] + } +} diff --git a/gm4_smelteries/data/gm4_smelteries/recipe/smeltery.json b/gm4_smelteries/data/gm4_smelteries/recipe/smeltery.json new file mode 100644 index 0000000000..3942609544 --- /dev/null +++ b/gm4_smelteries/data/gm4_smelteries/recipe/smeltery.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "CCC", + "CFC", + "IcI" + ], + "key": { + "C": "minecraft:cobblestone", + "F": "minecraft:furnace", + "I": "minecraft:iron_ingot", + "c": "minecraft:comparator" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "item/smeltery", + "minecraft:profile": "$smeltery", + "minecraft:custom_data": "{gm4_machines:{id:'smeltery'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.smeltery\",\"fallback\":\"Smeltery\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_soul_glass/overlay_48/data/minecraft/recipe/soul_glass.json b/gm4_soul_glass/overlay_48/data/minecraft/recipe/soul_glass.json deleted file mode 100644 index 494235c91c..0000000000 --- a/gm4_soul_glass/overlay_48/data/minecraft/recipe/soul_glass.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "minecraft:blasting", - "ingredient": { - "item": "minecraft:soul_sand" - }, - "result": { - "id": "minecraft:brown_stained_glass" - }, - "experience": 1.0, - "cookingtime": 800 -} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/amethyst_shard.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/amethyst_shard.json new file mode 100644 index 0000000000..c872928bf3 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/amethyst_shard.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:amethyst_shard" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:amethyst_block" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:amethyst_shard" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/cobweb.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/cobweb.json new file mode 100644 index 0000000000..c522f30e81 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/cobweb.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:cobweb" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:string" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:cobweb" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/diamond_horse_armor.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/diamond_horse_armor.json new file mode 100644 index 0000000000..0051003bf1 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/diamond_horse_armor.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:golden_horse_armor" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:gold_ingot" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:golden_horse_armor" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/enchanted_golden_apple.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/enchanted_golden_apple.json new file mode 100644 index 0000000000..94e85ab1ea --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/enchanted_golden_apple.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:enchanted_golden_apple" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:gold_block" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:enchanted_golden_apple" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/golden_horse_armor.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/golden_horse_armor.json new file mode 100644 index 0000000000..183e2adf8d --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/golden_horse_armor.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:diamond_horse_armor" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:diamond" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:diamond_horse_armor" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/gravel.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/gravel.json new file mode 100644 index 0000000000..08b118c039 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/gravel.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:gravel" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:flint" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:gravel" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/iron_horse_armor.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/iron_horse_armor.json new file mode 100644 index 0000000000..f3b27414b2 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/iron_horse_armor.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:iron_horse_armor" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:iron_ingot" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:iron_horse_armor" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/red_sand.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/red_sand.json new file mode 100644 index 0000000000..1c9749ee36 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/red_sand.json @@ -0,0 +1,37 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:red_sand" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:red_sandstone", + "minecraft:chiseled_red_sandstone", + "minecraft:cut_red_sandstone", + "minecraft:smooth_red_sandstone" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:red_sand" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/red_sand_from_red_dye.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/red_sand_from_red_dye.json new file mode 100644 index 0000000000..25bef876b8 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/red_sand_from_red_dye.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:red_sand_from_red_dye" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:red_dye" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:red_sand_from_red_dye" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/sand.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/sand.json new file mode 100644 index 0000000000..8aabcb6189 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/sand.json @@ -0,0 +1,37 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:sand" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:sandstone", + "minecraft:chiseled_sandstone", + "minecraft:cut_sandstone", + "minecraft:smooth_sandstone" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:sand" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/string.json b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/string.json new file mode 100644 index 0000000000..80e600d065 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/advancement/recipes/string.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:string" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": "#minecraft:wool" + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:string" + ] + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/amethyst_shard.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/amethyst_shard.json new file mode 100644 index 0000000000..3c95b3b6ca --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/amethyst_shard.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + "minecraft:amethyst_block" + ], + "result": { + "id": "minecraft:amethyst_shard", + "count": 4 + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/cobweb.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/cobweb.json new file mode 100644 index 0000000000..3967e1687c --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/cobweb.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "pattern": [ + "SSS", + "SBS", + "SSS" + ], + "key": { + "S": "minecraft:string", + "B": "minecraft:slime_ball" + }, + "result": { + "id": "minecraft:cobweb" + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/diamond_horse_armor.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/diamond_horse_armor.json new file mode 100644 index 0000000000..823415af48 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/diamond_horse_armor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + " D", + "DLD", + "D D" + ], + "key": { + "D": "minecraft:diamond", + "L": "minecraft:leather" + }, + "result": { + "id": "minecraft:diamond_horse_armor" + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/enchanted_golden_apple.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/enchanted_golden_apple.json new file mode 100644 index 0000000000..65b00cbb0a --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/enchanted_golden_apple.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "GGG", + "GAG", + "GGG" + ], + "key": { + "G": "minecraft:gold_block", + "A": "minecraft:apple" + }, + "result": { + "id": "minecraft:enchanted_golden_apple" + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/golden_horse_armor.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/golden_horse_armor.json new file mode 100644 index 0000000000..e0b6ed841a --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/golden_horse_armor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + " G", + "GLG", + "G G" + ], + "key": { + "G": "minecraft:gold_ingot", + "L": "minecraft:leather" + }, + "result": { + "id": "minecraft:golden_horse_armor" + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/gravel.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/gravel.json new file mode 100644 index 0000000000..40de076d64 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/gravel.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "pattern": [ + "FF", + "FF" + ], + "key": { + "F": "minecraft:flint" + }, + "result": { + "id": "minecraft:gravel", + "count": 4 + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/iron_horse_armor.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/iron_horse_armor.json new file mode 100644 index 0000000000..f2f1f96e3a --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/iron_horse_armor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + " I", + "ILI", + "I I" + ], + "key": { + "I": "minecraft:iron_ingot", + "L": "minecraft:leather" + }, + "result": { + "id": "minecraft:iron_horse_armor" + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/pointed_dripstone.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/pointed_dripstone.json new file mode 100644 index 0000000000..116c0f98c9 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/pointed_dripstone.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + "minecraft:dripstone_block" + ], + "result": { + "id": "minecraft:pointed_dripstone", + "count": 4 + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/quartz.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/quartz.json new file mode 100644 index 0000000000..1b28e42187 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/quartz.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + "minecraft:quartz_block" + ], + "result": { + "id": "minecraft:quartz", + "count": 4 + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/red_sand.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/red_sand.json new file mode 100644 index 0000000000..092f5f575a --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/red_sand.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "group": "red_sand", + "ingredients": [ + [ + "minecraft:red_sandstone", + "minecraft:chiseled_red_sandstone", + "minecraft:cut_red_sandstone", + "minecraft:smooth_red_sandstone" + ] + ], + "result": { + "id": "minecraft:red_sand", + "count": 4 + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/red_sand_from_red_dye.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/red_sand_from_red_dye.json new file mode 100644 index 0000000000..ff2c78c560 --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/red_sand_from_red_dye.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "group": "red_sand", + "pattern": [ + "SSS", + "SRS", + "SSS" + ], + "key": { + "S": "minecraft:sand", + "R": "minecraft:red_dye" + }, + "result": { + "id": "minecraft:red_sand", + "count": 8 + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/sand.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/sand.json new file mode 100644 index 0000000000..c507f3c2ce --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/sand.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "building", + "ingredients": [ + [ + "minecraft:sandstone", + "minecraft:chiseled_sandstone", + "minecraft:cut_sandstone", + "minecraft:smooth_sandstone" + ] + ], + "result": { + "id": "minecraft:sand", + "count": 4 + } +} diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/recipe/string.json b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/string.json new file mode 100644 index 0000000000..428388990a --- /dev/null +++ b/gm4_standard_crafting/data/gm4_standard_crafting/recipe/string.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + "#minecraft:wool" + ], + "result": { + "id": "minecraft:string", + "count": 3 + } +} diff --git a/gm4_standard_crafting/generate_recipes.py b/gm4_standard_crafting/generate_recipes.py index 65ea9f561b..06e1d8a958 100644 --- a/gm4_standard_crafting/generate_recipes.py +++ b/gm4_standard_crafting/generate_recipes.py @@ -1,4 +1,4 @@ -from beet import Context +from beet import Context, Recipe, Advancement from beet.contrib.vanilla import Vanilla from gm4_guidebook.generate_guidebooks import CustomCrafterRecipe import logging @@ -30,14 +30,88 @@ def recursive_apply(items: list[str], dir: str, shape: list[str], output_count: else: output: str = input - ctx.data[f"gm4_standard_crafting:{dir}/{item.removeprefix('minecraft:')}"] = CustomCrafterRecipe({ + recipe_path = f"gm4_standard_crafting:{dir}/{item.removeprefix('minecraft:')}" + + output_recipe = recipes.get(output) # type: ignore + if output_recipe is None: + group: str = output.removeprefix('minecraft:') # type: ignore + elif "group" in output_recipe.data: + group: str = output_recipe.data["group"] + else: + group: str = output.removeprefix('minecraft:') # type: ignore + output_recipe.data["group"] = group + output_recipe.data["__smithed__"] = { + "rules": [ + { + "type": "replace", + "target": "group", + "source": { + "type": "reference", + "path": "group" + } + } + ] + } + ctx.data[output] = Recipe(output_recipe.data) + + + ctx.data[recipe_path] = Recipe({ + "type": "minecraft:crafting_shaped", + "category": "building", + "group": group, #type: ignore + "pattern": shape, + "key": { + "#": item + }, + "result": { + "id": output, + "count": output_count + } + }) + + ctx.data[f"gm4_standard_crafting:recipes/{dir}/{item.removeprefix('minecraft:')}"] = Advancement({ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": recipe_path + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + item + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + recipe_path + ] + } + }) + + ctx.data[recipe_path] = CustomCrafterRecipe({ "name": f"gm4_standard_crafting:{dir}/{item}", "input": { "type": "shaped", "recipe": shape, "key": { "#": { - "item": item + "item": item } } }, diff --git a/gm4_teleportation_anchors/data/gm4_teleportation_anchors/advancement/recipes/teleportation_anchor.json b/gm4_teleportation_anchors/data/gm4_teleportation_anchors/advancement/recipes/teleportation_anchor.json new file mode 100644 index 0000000000..81bf1b6aa6 --- /dev/null +++ b/gm4_teleportation_anchors/data/gm4_teleportation_anchors/advancement/recipes/teleportation_anchor.json @@ -0,0 +1,50 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_teleportation_anchors:teleportation_anchor" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:end_stone_bricks", + "minecraft:lodestone", + "minecraft:ender_eye" + ] + } + ] + } + }, + "has_jammer": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": "minecraft:player_head", + "predicates": { + "minecraft:custom_data": "{gm4_machines:{id:'teleportation_jammer'}}" + } + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials", + "has_jammer" + ] + ], + "rewards": { + "recipes": [ + "gm4_teleportation_anchors:teleportation_anchor" + ] + } +} diff --git a/gm4_teleportation_anchors/data/gm4_teleportation_anchors/advancement/recipes/teleportation_jammer.json b/gm4_teleportation_anchors/data/gm4_teleportation_anchors/advancement/recipes/teleportation_jammer.json new file mode 100644 index 0000000000..220672cef2 --- /dev/null +++ b/gm4_teleportation_anchors/data/gm4_teleportation_anchors/advancement/recipes/teleportation_jammer.json @@ -0,0 +1,52 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_teleportation_anchors:teleportation_jammer" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:purpur_block", + "minecraft:purpur_pillar", + "minecraft:lodestone", + "minecraft:ender_eye", + "minecraft:end_crystal" + ] + } + ] + } + }, + "has_anchor": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": "minecraft:player_head", + "predicates": { + "minecraft:custom_data": "{gm4_machines:{id:'teleportation_anchor'}}" + } + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials", + "has_anchor" + ] + ], + "rewards": { + "recipes": [ + "gm4_teleportation_anchors:teleportation_jammer" + ] + } +} diff --git a/gm4_teleportation_anchors/data/gm4_teleportation_anchors/recipe/teleportation_anchor.json b/gm4_teleportation_anchors/data/gm4_teleportation_anchors/recipe/teleportation_anchor.json new file mode 100644 index 0000000000..60e5f9a34f --- /dev/null +++ b/gm4_teleportation_anchors/data/gm4_teleportation_anchors/recipe/teleportation_anchor.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "EPE", + "OLO", + "CCC" + ], + "key": { + "E": "minecraft:end_stone_bricks", + "P": "minecraft:ender_pearl", + "O": "minecraft:crying_obsidian", + "L": "minecraft:lodestone", + "C": "minecraft:chiseled_stone_bricks" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "item/teleportation_anchor", + "minecraft:profile": "$teleportation_anchor", + "minecraft:custom_data": "{gm4_machines:{id:'teleportation_anchor'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.teleportation_anchor\",\"fallback\":\"Teleportation Anchor\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_teleportation_anchors/data/gm4_teleportation_anchors/recipe/teleportation_jammer.json b/gm4_teleportation_anchors/data/gm4_teleportation_anchors/recipe/teleportation_jammer.json new file mode 100644 index 0000000000..19c9215084 --- /dev/null +++ b/gm4_teleportation_anchors/data/gm4_teleportation_anchors/recipe/teleportation_jammer.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + " P ", + "OEO", + "CeC" + ], + "key": { + "P": [ + "minecraft:purpur_block", + "minecraft:purpur_pillar" + ], + "O": "minecraft:crying_obsidian", + "E": "minecraft:ender_eye", + "C": "minecraft:cobblestone", + "e": "minecraft:end_crystal" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "item/teleportation_jammer", + "minecraft:profile": "$teleportation_jammer", + "minecraft:custom_data": "{gm4_machines:{id:'teleportation_jammer'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.teleportation_jammer\",\"fallback\":\"Teleportation Jammer\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_tunnel_bores/data/gm4_tunnel_bores/advancement/recipes/piston_minecart.json b/gm4_tunnel_bores/data/gm4_tunnel_bores/advancement/recipes/piston_minecart.json new file mode 100644 index 0000000000..8ebb2fd6ec --- /dev/null +++ b/gm4_tunnel_bores/data/gm4_tunnel_bores/advancement/recipes/piston_minecart.json @@ -0,0 +1,45 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_tunnel_bores:piston_minecart" + } + }, + "has_the_minecart_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_tunnel_bores:piston_minecart_from_furnace_minecart" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:furnace", + "minecraft:minecart", + "minecraft:furnace_minecart", + "minecraft:piston" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_the_minecart_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_tunnel_bores:piston_minecart", + "gm4_tunnel_bores:piston_minecart_from_furnace_minecart" + ] + } +} diff --git a/gm4_tunnel_bores/data/gm4_tunnel_bores/recipe/piston_minecart.json b/gm4_tunnel_bores/data/gm4_tunnel_bores/recipe/piston_minecart.json new file mode 100644 index 0000000000..47d6da5777 --- /dev/null +++ b/gm4_tunnel_bores/data/gm4_tunnel_bores/recipe/piston_minecart.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "group": "gm4_tunnel_bores:piston_minecart", + "pattern": [ + " F ", + "TMP" + ], + "key": { + "F": "minecraft:furnace", + "T": "minecraft:tripwire_hook", + "M": "minecraft:minecart", + "P": "minecraft:piston" + }, + "result": { + "id": "minecraft:furnace_minecart", + "components": { + "minecraft:custom_model_data": "item/piston_minecart", + "minecraft:custom_data": "{gm4_machines:{id:'tunnel_bore'}}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.minecart.bore\",\"fallback\":\"Minecart with Piston\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/gm4_tunnel_bores/data/gm4_tunnel_bores/recipe/piston_minecart_from_furnace_minecart.json b/gm4_tunnel_bores/data/gm4_tunnel_bores/recipe/piston_minecart_from_furnace_minecart.json new file mode 100644 index 0000000000..bc283632f0 --- /dev/null +++ b/gm4_tunnel_bores/data/gm4_tunnel_bores/recipe/piston_minecart_from_furnace_minecart.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "group": "gm4_tunnel_bores:piston_minecart", + "pattern": [ + "TMP" + ], + "key": { + "T": "minecraft:tripwire_hook", + "M": "minecraft:furnace_minecart", + "P": "minecraft:piston" + }, + "result": { + "id": "minecraft:furnace_minecart", + "components": { + "minecraft:custom_model_data": "item/piston_minecart", + "minecraft:custom_data": "{gm4_machines:{id:'tunnel_bore'}}", + "minecraft:custom_name": "{\"translate\":\"item.gm4.minecart.bore\",\"fallback\":\"Minecart with Piston\",\"color\":\"white\",\"italic\":false}" + } + } +} diff --git a/lib_custom_crafters/data/gm4/advancement/recipes/custom_crafter.json b/lib_custom_crafters/data/gm4/advancement/recipes/custom_crafter.json new file mode 100644 index 0000000000..c575aa24cb --- /dev/null +++ b/lib_custom_crafters/data/gm4/advancement/recipes/custom_crafter.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4:custom_crafter" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:crafting_table" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4:custom_crafter" + ] + } +} diff --git a/lib_custom_crafters/data/gm4/recipe/custom_crafter.json b/lib_custom_crafters/data/gm4/recipe/custom_crafter.json new file mode 100644 index 0000000000..ff77b40436 --- /dev/null +++ b/lib_custom_crafters/data/gm4/recipe/custom_crafter.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "pattern": [ + "ILI", + "CTC", + "CDC" + ], + "key": { + "I": "minecraft:iron_ingot", + "L": "minecraft:light_blue_dye", + "C": "minecraft:cobblestone", + "T": "minecraft:crafting_table", + "D": "minecraft:dropper" + }, + "result": { + "id": "minecraft:player_head", + "components": { + "minecraft:custom_model_data": "gm4_custom_crafters:item/custom_crafter", + "minecraft:profile": "$gm4_custom_crafters:custom_crafter", + "minecraft:custom_data": "{gm4_machines:{id:'custom_crafter'}}", + "minecraft:custom_name": "{\"translate\":\"block.gm4.custom_crafter\",\"fallback\":\"Custom Crafter\",\"color\":\"white\",\"italic\":false}" + } + } +}