소스 검색

修改nbt更新

HerobrineXia 5 년 전
부모
커밋
e332f3f48e
1개의 변경된 파일과 3개의 추가작업 그리고 1개의 파일을 삭제
  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
-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