Browse Source

不再返还奇怪的东西

HerobrineXia 5 năm trước cách đây
mục cha
commit
52973cf954

+ 4 - 0
data/item/functions/pop_slot/pop_item.mcfunction

@@ -1,5 +1,9 @@
 summon item ~ ~ ~ {Item:{id:"minecraft:barrier",Count:1b,tag:{LockTempItem:1b,display:{Name:'{"text":"非法物品","color":"red"}'}}},Tags:["LockTempItem","PopItem"]}
 function item:pop_slot/select_item
 kill @e[type=item,nbt={Item:{id:"minecraft:barrier"}},tag=LockTempItem]
+# 不返还奇怪的东西
+kill @e[type=item,nbt={Item:{tag:{game_item:1b}}}]
+kill @e[type=item,nbt={Item:{tag:{lobby_item:1b}}}]
+kill @e[type=item,nbt={Item:{tag:{LockItem:1b}}}]
 data modify entity @e[type=item,tag=LockTempItem,limit=1] Thrower set from entity @s UUID
 tag @e[type=item,tag=LockTempItem] remove LockTempItem

+ 4 - 0
data/item/functions/pop_slot/return_item.mcfunction

@@ -1,6 +1,10 @@
 summon item ~ ~ ~ {Item:{id:"minecraft:barrier",Count:1b,tag:{LockTempItem:1b,display:{Name:'{"text":"非法物品","color":"red"}'}}},Tags:["LockTempItem","ReturnItem"]}
 function item:pop_slot/select_item
 kill @e[type=item,nbt={Item:{id:"minecraft:barrier"}},tag=LockTempItem]
+# 不返还奇怪的东西
+kill @e[type=item,nbt={Item:{tag:{game_item:1b}}}]
+kill @e[type=item,nbt={Item:{tag:{lobby_item:1b}}}]
+kill @e[type=item,nbt={Item:{tag:{LockItem:1b}}}]
 data modify entity @e[type=item,tag=LockTempItem,limit=1] Thrower set from entity @s UUID
 execute as @e[type=item,tag=LockTempItem,limit=1] run function item:disable_throw
 tag @e[type=item,tag=LockTempItem] remove LockTempItem

+ 1 - 1
data/mini/functions/colormatch/tick2.mcfunction

@@ -4,7 +4,7 @@ execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ magma_block run function
 execute as @a[tag=mini_running] at @s if block ~ ~-2 ~ magma_block run function mini:colormatch/player_lose_heart
 
 # 检测玩家背包
-execute as @a[tag=mini_running] unless data entity @s Inventory[{Slot:8b,tag:{game_item:1b}}] run function mini:colormatch/game/show_floor_block
+execute as @a[tag=mini_running] unless data entity @s Inventory[{Slot:8b,tag:{game_item:1b},Count:1b}] run function mini:colormatch/game/show_floor_block
 
 # 开始新的一轮
 execute if score $countdown_fast mem matches 0 if score $color_match_type mem matches 0 run function mini:colormatch/game/remove_ground