2
0
Эх сурвалжийг харах

Merge branch 'master' of https://github.com/LTCatt/LTW3

LTCatt 6 жил өмнө
parent
commit
37de5d0308

+ 4 - 0
data/item/functions/lobby_state/check_slot.mcfunction

@@ -1,6 +1,10 @@
 # 第八格
 # 第八格
 execute unless data entity @s[tag=lobby_watch] Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_watch:1b}}] run function item:lobby_state/join_game
 execute unless data entity @s[tag=lobby_watch] Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_watch:1b}}] run function item:lobby_state/join_game
+execute if data entity @s[tag=lobby_watch] Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_watch:1b}}] unless data entity @s[tag=lobby_watch] Inventory[{Count:1b,Slot:8b,tag:{lobby_item:1b,lobby_watch:1b}}] run function item:lobby_state/join_watch
+execute if data entity @s[tag=lobby_watch] Inventory[{tag:{lobby_item:1b,lobby_ready:1b}}] run clear @s lime_dye{lobby_item:1b,lobby_ready:1b} 
 execute unless data entity @s[tag=lobby_ready] Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_ready:1b}}] run function item:lobby_state/join_watch
 execute unless data entity @s[tag=lobby_ready] Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_ready:1b}}] run function item:lobby_state/join_watch
+execute if data entity @s[tag=lobby_ready] Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_ready:1b}}] unless data entity @s[tag=lobby_ready] Inventory[{Count:1b,Slot:8b,tag:{lobby_item:1b,lobby_ready:1b}}] run function item:lobby_state/join_game
+execute if data entity @s[tag=lobby_ready] Inventory[{tag:{lobby_item:1b,lobby_watch:1b}}] run clear @s gray_dye{lobby_item:1b,lobby_watch:1b}
 
 
 # 清除临时物品
 # 清除临时物品
 clear @s barrier{LockTempItem:1b}
 clear @s barrier{LockTempItem:1b}

+ 2 - 1
data/item/functions/lobby_state/join_game.mcfunction

@@ -1,4 +1,5 @@
 # 处理第七格
 # 处理第七格
+clear @s lime_dye{lobby_item:1b,lobby_ready:1b}
 clear @s gray_dye{lobby_item:1b,lobby_watch:1b}
 clear @s gray_dye{lobby_item:1b,lobby_watch:1b}
 kill @e[type=item,nbt={Item:{id:"minecraft:gray_dye",tag:{lobby_item:1b,lobby_watch:1b}}}]
 kill @e[type=item,nbt={Item:{id:"minecraft:gray_dye",tag:{lobby_item:1b,lobby_watch:1b}}}]
 execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_watch:1b}}] at @s run function item:disable_slot/disable_slot_8
 execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_watch:1b}}] at @s run function item:disable_slot/disable_slot_8
@@ -9,5 +10,5 @@ execute at @s run function lib:sounds/hit
 tag @s remove lobby_watch
 tag @s remove lobby_watch
 tag @s add lobby_ready
 tag @s add lobby_ready
 
 
-# FIXME: [HIM] 玩家以准备中状态下线,重新上线后依然是准备中,而没有重置为旁观
+# FIXME <待复现> 玩家以准备中状态下线,重新上线后依然是准备中,而没有重置为旁观
 # TODO: 在人数 5+ 的时候刷双倍的土豆
 # TODO: 在人数 5+ 的时候刷双倍的土豆

+ 1 - 0
data/item/functions/lobby_state/join_watch.mcfunction

@@ -1,5 +1,6 @@
 # 处理第七格
 # 处理第七格
 clear @s lime_dye{lobby_item:1b,lobby_ready:1b}
 clear @s lime_dye{lobby_item:1b,lobby_ready:1b}
+clear @s gray_dye{lobby_item:1b,lobby_watch:1b}
 kill @e[type=item,nbt={Item:{id:"minecraft:lime_dye",tag:{lobby_item:1b,lobby_ready:1b}}}]
 kill @e[type=item,nbt={Item:{id:"minecraft:lime_dye",tag:{lobby_item:1b,lobby_ready:1b}}}]
 execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_ready:1b}}] at @s run function item:disable_slot/disable_slot_8
 execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_ready:1b}}] at @s run function item:disable_slot/disable_slot_8
 replaceitem entity @s hotbar.8 gray_dye{lobby_item:1b,lobby_watch:1b,display:{Name:'{"text":"旁观 (按 Q 切换)","color":"white","italic":false}',Lore:['{"text":"你将在下一局旁观游戏","color":"gray","italic":false}']}}
 replaceitem entity @s hotbar.8 gray_dye{lobby_item:1b,lobby_watch:1b,display:{Name:'{"text":"旁观 (按 Q 切换)","color":"white","italic":false}',Lore:['{"text":"你将在下一局旁观游戏","color":"gray","italic":false}']}}