Browse Source

修改nbt更新

HerobrineXia 5 years ago
parent
commit
e332f3f48e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      data/mini/functions/trade/tick1.mcfunction

+ 3 - 1
data/mini/functions/trade/tick1.mcfunction

@@ -1,2 +1,4 @@
 scoreboard players add $1tick mem 1
 scoreboard players add $1tick mem 1
-execute as @e[type=villager,tag=TradePlayer] store result entity @s SBMJ byte 1 run scoreboard players get $1tick mem
+execute if score $1tick mem matches 1 as @e[type=villager,tag=TradePlayer] run data modify entity @s BABA set value "IS MORE"
+execute if score $1tick mem matches 2 as @e[type=villager,tag=TradePlayer] run data modify entity @s BABA set value "IS LESS"
+execute if score $1tick mem matches 2 run scoreboard players set $1tick mem 0