如解锁了emeraldegg:rainbow_pickaxe配方,就执行say hello,world
1.16.3
1.16.3
进度触发器
minecraft:recipe_unlocked
否则只能exe store+recipe take的值为0检测(
minecraft:recipe_unlocked
否则只能exe store+recipe take的值为0检测(
计分板前置自己写(先写命令的
#!data/emeraldegg/functions/tick.mcfunction
- #!data/emeraldegg/functions/tick.mcfunction
- execute as @a[tag=!unlock] run function emeraldegg:1
- execute store result score # temp run recipe take @s emeraldegg:rainbow_pickaxe
- execute if score # temp matches 1 run function emeraldegg:2
- say hello,world
- tag @s add unlock
- recipe give @s emeraldegg:rainbow_pickaxe
然后进度
#!data/emeraldegg/advancements/rainbow_pickaxe.json
- {
- "criteria": {
- "recipe_unlocked":{
- "trigger": "minecraft:recipe_unlocked",
- "conditions": {
- "recipe": "emeraldegg:rainbow_pickaxe"
- }
- }
- },
- "rewards": {
- "function": "emeraldegg:rainbow_pickaxe"
- }
- }
#!data/emeraldegg/functions/rainbow_pickaxe.mcfunction
- say hello,world