Просмотр исходного кода

修改按键显示&color match方块显示

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

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

@@ -3,7 +3,7 @@ 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: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
-replaceitem entity @s hotbar.8 lime_dye{lobby_item:1b,lobby_ready:1b,display:{Name:'{"text":"已准备 (按 Q 切换)","color":"green","italic":false}',Lore:['{"text":"你将在下一局参与游戏","color":"gray","italic":false}']}}
+replaceitem entity @s hotbar.8 lime_dye{lobby_item:1b,lobby_ready:1b,display:{Name:'[{"text":"已准备 (按 ","color":"green","italic":false},{"keybind":"key.drop","color":"green","italic":false},{"text":" 切换)","color":"green","italic":false}]',Lore:['{"text":"你将在下一局参与游戏","color":"gray","italic":false}']}}
 execute at @s run function lib:sounds/hit
 
 # 处理数据

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

@@ -3,7 +3,7 @@ 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}}}]
 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":"旁观 (按 ","color":"white","italic":false},{"keybind":"key.drop","color":"white","italic":false},{"text":" 切换)","color":"white","italic":false}]',Lore:['{"text":"你将在下一局旁观游戏","color":"gray","italic":false}']}}
 execute at @s run function lib:sounds/hit2
 
 # 处理数据

+ 12 - 12
data/mini/functions/colormatch/game/replace_wall.mcfunction

@@ -34,18 +34,18 @@ execute if score $color_match_floor mem matches 9 run fill 1075 11 3999 1075 40
 execute if score $color_match_floor mem matches 9 run fill 1075 11 3999 1049 40 3999 purpur_block
 execute if score $color_match_floor mem matches 9 run fill 1049 11 3999 1049 40 4025 purpur_block
 execute if score $color_match_floor mem matches 9 run fill 1049 11 4025 1075 40 4025 purpur_block
-execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1075 40 4025 emerald_block
-execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1049 40 3999 emerald_block
-execute if score $color_match_floor mem matches 10 run fill 1049 11 3999 1049 40 4025 emerald_block
-execute if score $color_match_floor mem matches 10 run fill 1049 11 4025 1075 40 4025 emerald_block
-execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1075 40 4025 prismarine
-execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1049 40 3999 prismarine
-execute if score $color_match_floor mem matches 11 run fill 1049 11 3999 1049 40 4025 prismarine
-execute if score $color_match_floor mem matches 11 run fill 1049 11 4025 1075 40 4025 prismarine
-execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1075 40 4025 soul_soil
-execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1049 40 3999 soul_soil
-execute if score $color_match_floor mem matches 12 run fill 1049 11 3999 1049 40 4025 soul_soil
-execute if score $color_match_floor mem matches 12 run fill 1049 11 4025 1075 40 4025 soul_soil
+execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1075 40 4025 prismarine
+execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1049 40 3999 prismarine
+execute if score $color_match_floor mem matches 10 run fill 1049 11 3999 1049 40 4025 prismarine
+execute if score $color_match_floor mem matches 10 run fill 1049 11 4025 1075 40 4025 prismarine
+# execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1075 40 4025 prismarine
+# execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1049 40 3999 prismarine
+# execute if score $color_match_floor mem matches 11 run fill 1049 11 3999 1049 40 4025 prismarine
+# execute if score $color_match_floor mem matches 11 run fill 1049 11 4025 1075 40 4025 prismarine
+# execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1075 40 4025 soul_soil
+# execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1049 40 3999 soul_soil
+# execute if score $color_match_floor mem matches 12 run fill 1049 11 3999 1049 40 4025 soul_soil
+# execute if score $color_match_floor mem matches 12 run fill 1049 11 4025 1075 40 4025 soul_soil
 # execute if score $color_match_floor mem matches 13 run fill 1075 11 3999 1075 40 4025 packed_ice
 # execute if score $color_match_floor mem matches 13 run fill 1075 11 3999 1049 40 3999 packed_ice
 # execute if score $color_match_floor mem matches 13 run fill 1049 11 3999 1049 40 4025 packed_ice

+ 12 - 0
data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -25,3 +25,15 @@ scoreboard players operation $countdown_max mem = $countdown_fast mem
 scoreboard players set $bossbar_type mem 1
 function lib:bossbar/show
 bossbar set mini:red name "地板消失"
+
+# 物品栏显示
+execute if score $color_match_floor mem matches 1 run replaceitem entity @s hotbar.8 acacia_planks{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.acacia_planks","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 2 run replaceitem entity @s hotbar.8 birch_planks{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.birch_planks","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 3 run replaceitem entity @s hotbar.8 bedrock{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.bedrock","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 4 run replaceitem entity @s hotbar.8 crimson_planks{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.crimson_planks","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 5 run replaceitem entity @s hotbar.8 warped_planks{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.warped_planks","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 6 run replaceitem entity @s hotbar.8 gold_block{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.gold_block","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 7 run replaceitem entity @s hotbar.8 bricks{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.bricks","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 8 run replaceitem entity @s hotbar.8 mossy_cobblestone{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.mossy_cobblestone","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 9 run replaceitem entity @s hotbar.8 purpur_block{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.purpur_block","bold":true,"color":"gold"}]'}}
+execute if score $color_match_floor mem matches 10 run replaceitem entity @s hotbar.8 prismarine{game_item:1b,display:{Name:'[{"text":"下一轮的地板方块为:","color":"white","italic":false},{"translate": "block.minecraft.prismarine","bold":true,"color":"gold"}]'}}