Explorar o código

尝试修复村民抽搐v2

HerobrineXia %!s(int64=5) %!d(string=hai) anos
pai
achega
d5ee41d3f2

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

@@ -3,5 +3,6 @@ data modify entity @s Pos set from entity @a[tag=tempPlayerTp,limit=1] Pos
 data modify entity @s Rotation[0] set from entity @a[tag=tempPlayerTp,limit=1] Rotation[0]
 data modify entity @s Rotation[0] set from entity @a[tag=tempPlayerTp,limit=1] Rotation[0]
 data modify entity @s Rotation[1] set value 0f
 data modify entity @s Rotation[1] set value 0f
 tag @s add tpTemp
 tag @s add tpTemp
+scoreboard players set @s temp 0
 execute at @s run function mini:trade/game/villager_tp3
 execute at @s run function mini:trade/game/villager_tp3
 execute if entity @a[tag=noVillager,tag=tempPlayerTp] at @s run function mini:trade/game/villager_rebirth
 execute if entity @a[tag=noVillager,tag=tempPlayerTp] at @s run function mini:trade/game/villager_rebirth

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

@@ -1,3 +1,4 @@
-execute positioned ^ ^ ^0.4 if block ~ ~ ~ #mini:redefined_air if block ~ ~1 ~ #mini:redefined_air if entity @s[distance=..2] run function mini:trade/game/villager_tp3
+scoreboard players add @s temp 1
+execute positioned ^ ^ ^0.2 if block ~ ~ ~ #mini:redefined_air if block ~ ~1 ~ #mini:redefined_air if score @s temp matches ..10 run function mini:trade/game/villager_tp3
 tp @s[tag=tpTemp] ~ ~ ~ facing entity @a[tag=tempPlayerTp,limit=1]
 tp @s[tag=tpTemp] ~ ~ ~ facing entity @a[tag=tempPlayerTp,limit=1]
 tag @s remove tpTemp
 tag @s remove tpTemp