destroy_rule.mcfunction 568 B

12345678910
  1. # as rule marker
  2. # 销毁 value 条规则
  3. execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.destroy_rule
  4. scoreboard players operation #temp_scr rgb_sys += @a[tag=rgb_op,limit=1] rgb_destroy_rule
  5. execute store result score #temp rgb_sys run data get entity @s data.conditions[{type:"destroy_rule"}].value
  6. execute if score #temp_scr rgb_sys < #temp rgb_sys run data modify entity @s data.enable set value 0
  7. execute store result entity @s data.player.conditions.destroy_rule short 1 run scoreboard players get #temp_scr rgb_sys