HerobrineXia 6 лет назад
Родитель
Сommit
f77b8ceecb

+ 2 - 0
data/mini/functions/phantom/game/give_trident.mcfunction

@@ -0,0 +1,2 @@
+clear @s trident{GameItem:1b}
+replaceitem entity @s hotbar.8 trident{GameItem:1b,Unbreakable:1b,Enchantments:[],display:{Name:'{"text":"叉鸟戟","color":"aqua","italic": false}',Lore:['{"text":"用来插幻翼再合适不过了!","color":"white","italic": false}']}} 1

+ 8 - 1
data/mini/functions/phantom/tick2.mcfunction

@@ -1,5 +1,12 @@
+# 给与玩家三叉戟
+execute as @a[tag=mini_running] unless score @s countdown matches 1.. run function mini:phantom/game/give_trident
+execute as @a[tag=mini_running] unless score @s countdown matches 1.. run scoreboard players set @s countdown 2
+
+# 清理错位的三叉戟
+execute as @a[tag=mini_running] unless score @s countdown matches 1.. unless data entity @s Inventory[{id:"minecraft:trident",Slot:8b,tag:{GameItem:1b}}] if data entity @s Inventory[{id:"minecraft:trident",tag:{GameItem:1b}}] run function mini:phantom/game/give_trident
+
 # 更改对出的三叉戟的nbt
 execute as @e[type=trident,tag=!fixed_trident] run function mini:phantom/game/fix_trident
 
 # 删除掉在地上的三叉戟
-kill @e[type=trident,nbt={OnGround:1b}]
+kill @e[type=trident,nbt={inGround:1b}]