Browse Source

修改递归函数

HerobrineXia 5 years ago
parent
commit
9c28156b12

+ 1 - 0
data/mini/functions/trade/game/villager_tp2.mcfunction

@@ -1,3 +1,4 @@
 tag @s add tpPlayer
 tp @s @a[tag=tempPlayerTp,limit=1]
+tag @s add tpTemp
 execute at @s run function mini:trade/game/villager_tp3

+ 2 - 1
data/mini/functions/trade/game/villager_tp3.mcfunction

@@ -1,2 +1,3 @@
 execute positioned ^ ^ ^0.1 if block ~ ~ ~ air if block ~ ~1 ~ air if entity @s[distance=..3] run function mini:trade/game/villager_tp3
-tp @s ~ ~ ~
+tp @s[tag=tpTemp] ~ ~ ~
+tag @s remove tpTemp