destroy_rule.mcfunction 543 B

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