Skip to content

Recipe Unlocker Reward Script

NorthWestTrees edited this page Jul 16, 2024 · 5 revisions

General

This function is linked to the "minecraft:tick" function tag.
The main use is to test if the player has met the criteria to unlock a recipe in CCTV Craft.

Function Script

# This script will run every tick using the "minecraft:tick" tag.
# | Unlocks when the player mines "cctvcraft:aluminum_ore"
execute as @a if score @s cctvcraftRecipe01 matches 1.. run recipe give @s cctvcraft:aluminum_ingot_blasting
execute as @a if score @s cctvcraftRecipe01 matches 1.. run recipe give @s cctvcraft:aluminum_ingot_smelting
# | Unlocked when the player crafts "cctvcraft:aluminum_ingot"
execute as @a if score @s cctvcraftRecipe02 matches 1.. run recipe give @s cctvcraft:aluminum_nugget_blasting
execute as @a if score @s cctvcraftRecipe02 matches 1.. run recipe give @s cctvcraft:aluminum_nugget_smelting
execute as @a if score @s cctvcraftRecipe02 matches 1.. run recipe give @s cctvcraft:aluminum_nugget_crafting
execute as @a if score @s cctvcraftRecipe02 matches 1.. run recipe give @s cctvcraft:aluminum_plate_crafting
execute as @a if score @s cctvcraftRecipe02 matches 1.. run recipe give @s cctvcraft:copper_plate_crafting
# | Unlocked when the player crafts "cctvcraft:aluminum_plate"
execute as @a if score @s cctvcraftRecipe03 matches 1.. run recipe give @s cctvcraft:display_crafting
execute as @a if score @s cctvcraftRecipe03 matches 1.. run recipe give @s cctvcraft:hand_saw_crafting
execute as @a if score @s cctvcraftRecipe03 matches 1.. run recipe give @s cctvcraft:lens_crafting
# | Unlocked when the player crafts "cctvcraft:hand_saw"
execute as @a if score @s cctvcraftRecipe04 matches 1.. run recipe give @s cctvcraft:wooden_board_crafting
# | Unlocked when the player crafts "cctvcraft:wooden_board"
execute as @a if score @s cctvcraftRecipe05 matches 1.. run recipe give @s cctvcraft:aluminum_wire_crafting
execute as @a if score @s cctvcraftRecipe05 matches 1.. run recipe give @s cctvcraft:copper_wire_crafting
# | Unlocked when the player crafts "cctvcraft:aluminum_wire"
execute as @a if score @s cctvcraftRecipe06 matches 1.. run recipe give @s cctvcraft:chain_fence_crafting
execute as @a if score @s cctvcraftRecipe06 matches 1.. run recipe give @s cctvcraft:barbed_wire_crafting
# | Unlocked when the player crafts "cctvcraft:aluminum_nugget"
execute as @a if score @s cctvcraftRecipe07 matches 1.. run recipe give @s cctvcraft:aluminum_ingot_crafting
# | Unlocked when the player crafts "cctvcraft:copper_wire"
execute as @a if score @s cctvcraftRecipe08 matches 1.. run recipe give @s cctvcraft:electric_chain_fence_crafting
execute as @a if score @s cctvcraftRecipe08 matches 1.. run recipe give @s cctvcraft:name_usb_crafting
# | Unlocked when the player crafts "cctvcraft:display"
# | Unlocked when the player crafts "cctvcraft:lens"

Related Pages

Changes

  • 4.8.0
    • Added Recipe Unlocker Reward Function Script

🏠 Home

😺 GitHub

πŸ“‘ Mod Pages

πŸ§ͺ Development

Clone this wiki locally