Browse Source

新村民同步tag

HerobrineXia 5 years ago
parent
commit
0219020243

+ 1 - 1
data/mini/functions/trade/game/villager_rebirth.mcfunction

@@ -7,7 +7,7 @@ data modify entity @e[type=villager,tag=newVillager,limit=1] Xp set from entity
 data modify entity @e[type=villager,tag=newVillager,limit=1] VillagerData set from entity @s VillagerData
 data modify entity @e[type=villager,tag=newVillager,limit=1] Offers set from entity @s Offers
 # 清理tag
-tag @e[type=villager,tag=newVillager] remove newVillager
+data modify entity @e[type=villager,tag=newVillager,limit=1] Tags set from entity @s Tags
 # 清理旧村民
 execute at @s run tp @s ~ -100 ~
 kill @s

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

@@ -3,4 +3,4 @@ tp @s @a[tag=tempPlayerTp,limit=1]
 tag @s add tpTemp
 execute at @a[tag=tempPlayerTp,limit=1] run tp @s ~ ~ ~ ~ 0
 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