소스 검색

修改锁格子

HerobrineXia 5 년 전
부모
커밋
dd1463ac91

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

@@ -5,4 +5,4 @@
 execute unless data entity @s Inventory[{Slot:8b,tag:{game_item:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b,LockSlot:8b},Count:1b}] run function item:disable_slot/disable_slot_8
 
 # 清除临时物品
-clear @a barrier{LockTempItem:1b}
+clear @a red_dye{LockTempItem:1b}

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

@@ -1,4 +1,4 @@
-clear @s barrier{LockItem:1b,LockSlot:7b}
+clear @s red_dye{LockItem:1b,LockSlot:7b}
 execute if data entity @s Inventory[{Slot:7b}] run scoreboard players set @s item_slot 7
 execute if data entity @s Inventory[{Slot:7b}] at @s run function item:pop_slot/return_item
-replaceitem entity @s hotbar.7 barrier{LockItem:1b,LockSlot:7b,display:{Name:'{"text":"已锁定","color":"red","italic":false}'}}
+replaceitem entity @s hotbar.7 red_dye{LockItem:1b,LockSlot:7b,display:{Name:'{"text":"已锁定","color":"red","italic":false}'}}

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

@@ -1,4 +1,4 @@
-clear @s barrier{LockItem:1b,LockSlot:8b}
+clear @s red_dye{LockItem:1b,LockSlot:8b}
 execute if data entity @s Inventory[{Slot:8b}] run scoreboard players set @s item_slot 8
 execute if data entity @s Inventory[{Slot:8b}] at @s run function item:pop_slot/return_item
-replaceitem entity @s hotbar.8 barrier{LockItem:1b,LockSlot:8b,display:{Name:'{"text":"已锁定","color":"red","italic":false}'}}
+replaceitem entity @s hotbar.8 red_dye{LockItem:1b,LockSlot:8b,display:{Name:'{"text":"已锁定","color":"red","italic":false}'}}

+ 2 - 2
data/item/functions/pop_slot/pop_item.mcfunction

@@ -1,6 +1,6 @@
-summon item ~ ~ ~ {Item:{id:"minecraft:barrier",Count:1b,tag:{LockTempItem:1b,display:{Name:'{"text":"非法物品","color":"red"}'}}},Tags:["LockTempItem","PopItem"]}
+summon item ~ ~ ~ {Item:{id:"minecraft:red_dye",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:{id:"minecraft:red_dye"}},tag=LockTempItem]
 # 不返还奇怪的东西
 kill @e[type=item,nbt={Item:{tag:{game_item:1b}}}]
 kill @e[type=item,nbt={Item:{tag:{lobby_item:1b}}}]

+ 2 - 2
data/item/functions/pop_slot/return_item.mcfunction

@@ -1,6 +1,6 @@
-summon item ~ ~ ~ {Item:{id:"minecraft:barrier",Count:1b,tag:{LockTempItem:1b,display:{Name:'{"text":"非法物品","color":"red"}'}}},Tags:["LockTempItem","ReturnItem"]}
+summon item ~ ~ ~ {Item:{id:"minecraft:red_dye",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:{id:"minecraft:red_dye"}},tag=LockTempItem]
 # 不返还奇怪的东西
 kill @e[type=item,nbt={Item:{tag:{game_item:1b}}}]
 kill @e[type=item,nbt={Item:{tag:{lobby_item:1b}}}]

+ 1 - 1
data/item/functions/tick2.mcfunction

@@ -6,7 +6,7 @@ execute if score $survival mem matches 1.. unless score $state mem matches 5 as
 execute as @a if data entity @s Inventory[{"tag":{"bonus_new":1b}}] run function item:bonus_item/call
 
 # 检测玩家格子锁定
-execute if score $state mem matches 1.. unless score $survival mem matches 1.. as @a[team=!debugging] run function item:disable_slot/check_slot
+execute if score $state mem matches 1.. as @a[team=!debugging] run function item:disable_slot/check_slot
 execute if score $state mem matches 0 as @a run function ltw:state/0/state/check_slot
 execute if score $state mem matches 0.. run kill @e[type=item,tag=LockTempItem]
 

+ 1 - 1
data/ltw/functions/state/0/state/check_slot.mcfunction

@@ -5,4 +5,4 @@ execute unless data entity @s[team=playing] Inventory[{Slot:8b,tag:{lobby_item:1
 execute if data entity @s[team=playing] 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 red_dye{LockTempItem:1b}

+ 1 - 1
data/ltw/functions/state/6/player_enter.mcfunction

@@ -27,5 +27,5 @@ spectate
 
 # 清理物品
 clear @s #mini:game_item{game_item:1b}
-clear @s barrier{LockItem:1b}
+clear @s red_dye{LockItem:1b}
 recipe take @s *

+ 1 - 1
data/mini/functions/main/player_enter.mcfunction

@@ -8,7 +8,7 @@ scoreboard players set @s[team=watching] mini_score -1000000
 function mini:main/update_player_count
 
 clear @s #mini:game_item{game_item:1b}
-clear @s barrier{LockItem:1b}
+clear @s red_dye{LockItem:1b}
 recipe take @s *
 
 execute if score $mini_type mem matches 1 run function mini:parkour/player_enter