Przeglądaj źródła

修复锁物品的bug,结束游戏强制锁定89格,不再返还gameitem以及lobbyitem

HerobrineXia 6 lat temu
rodzic
commit
e6d5af148d

+ 1 - 1
data/item/functions/disable_slot/disable_slot_7.mcfunction

@@ -1,3 +1,3 @@
 clear @s barrier{LockItem:1b,LockSlot:7b}
-execute if data entity @s Inventory[{Slot:7b}] unless data entity @s Inventory[{Slot:7b,tag:{LockItem:1b}}] at @s run function item:return_slot/return_slot_7
+execute if data entity @s Inventory[{Slot:7b}] unless data entity @s Inventory[{Slot:7b,tag:{LockItem:1b}}] unless data entity @s Inventory[{Slot:7b,tag:{game_item:1b}}] unless data entity @s Inventory[{Slot:7b,tag:{lobby_item:1b}}] at @s run function item:return_slot/return_slot_7
 replaceitem entity @s hotbar.7 barrier{LockItem:1b,LockSlot:7b,display:{Name:'{"text":"已锁定","color":"red","italic":false}'}}

+ 1 - 1
data/item/functions/disable_slot/disable_slot_8.mcfunction

@@ -1,3 +1,3 @@
 clear @s barrier{LockItem:1b,LockSlot:8b}
-execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b}}] at @s run function item:return_slot/return_slot_8
+execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{game_item:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{lobby_item:1b}}] at @s run function item:return_slot/return_slot_8
 replaceitem entity @s hotbar.8 barrier{LockItem:1b,LockSlot:8b,display:{Name:'{"text":"已锁定","color":"red","italic":false}'}}

+ 4 - 0
data/mini/functions/colormatch/game_end.mcfunction

@@ -1,2 +1,6 @@
 # 当前游戏结束时触发
 forceload remove 1001 4000 1075 4025
+
+# 清理锁定格子
+execute as @a run function item:disable_slot/disable_slot_7
+execute as @a run function item:disable_slot/disable_slot_8

+ 1 - 1
data/mini/functions/hotpm/game/pm_give.mcfunction

@@ -2,7 +2,7 @@
 scoreboard players reset @a temp
 execute as @a run scoreboard players operation @s temp = @s mini_heart
 execute as @a run scoreboard players operation @s temp *= #const_100 mem
-execute as @a run scoreboard players operation @s temp += @s total_score
+execute as @a run scoreboard players operation @s temp += @s total_score_disp
 scoreboard players add @a[tag=!pm_explode_last] temp 10000
 
 # 寻找最高分

+ 5 - 1
data/mini/functions/phantom/game_end.mcfunction

@@ -3,4 +3,8 @@ forceload remove 1000 6000 1064 6064
 gamerule doDaylightCycle false
 
 # 计算得分
-execute as @a[tag=!watcher,tag=!debug] run scoreboard players operation @s mini_score = @s kill_phantom
+execute as @a[tag=!watcher,tag=!debug] run scoreboard players operation @s mini_score = @s kill_phantom
+
+# 清理锁定格子
+execute as @a run function item:disable_slot/disable_slot_7
+execute as @a run function item:disable_slot/disable_slot_8