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

实装色彩迷阵新地板

HerobrineXia 5 жил өмнө
parent
commit
59fd561612

+ 1 - 3
data/mini/functions/colormatch/game/generate_parts.mcfunction

@@ -9,9 +9,7 @@ execute if score $floor_generate_part mem matches 5 positioned 1000 10 4000 run
 execute if score $floor_generate_part mem matches 6 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_6",integrity:0.16666666666666666f}
 execute if score $floor_generate_part mem matches 7 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_7",integrity:0.14285714285714285f}
 execute if score $floor_generate_part mem matches 8 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_8",integrity:0.125f}
-execute if score $floor_generate_part mem matches 9 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_9",integrity:0.1111111111111111f}
-execute if score $floor_generate_part mem matches 10 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_10",integrity:0.1f}
-execute if score $floor_generate_part mem matches 11 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_15",integrity:0.01f}
+# execute if score $floor_generate_part mem matches 9 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_9",integrity:0.11111111111w
 # execute if score $floor_generate_part mem matches 11 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_11",integrity:0.09090909090909091f}
 # execute if score $floor_generate_part mem matches 12 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_12",integrity:0.08333333333333333f}
 # execute if score $floor_generate_part mem matches 13 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_13",integrity:0.07692307692307693f}

+ 16 - 16
data/mini/functions/colormatch/game/get_random_floor.mcfunction

@@ -4,19 +4,19 @@ execute store result score $color_match_floor mem run data get storage ltw:mini
 data remove storage ltw:mini colormatch.types[0]
 
 # 随机选择不消失的方块 # prismarine
-execute positioned 1001 10 4000 run fill ~ ~1 ~ ~24 ~1 ~24 air replace
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 1 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered acacia_planks
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 2 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered birch_planks
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 3 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered bedrock
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 4 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered crimson_planks
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 5 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered warped_planks
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 6 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered gold_block
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 7 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered bricks
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 8 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered mossy_cobblestone
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 9 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered purpur_block
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 10 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered prismarine
-# execute positioned 1001 10 4000 if score $color_match_floor mem matches 11 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered emerald_block
-# execute positioned 1001 10 4000 if score $color_match_floor mem matches 12 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered soul_soil
-# execute positioned 1001 10 4000 if score $color_match_floor mem matches 13 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered packed_ice
-# execute positioned 1001 10 4000 if score $color_match_floor mem matches 14 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered white_wool
-# execute positioned 1001 10 4000 if score $color_match_floor mem matches 15 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered diamond_block
+execute positioned 1001 10 4000 run fill ~ ~1 ~ ~20 ~1 ~20 air replace
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 1 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered acacia_planks
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 2 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered birch_planks
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 3 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered bedrock
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 4 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered crimson_planks
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 5 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered warped_planks
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 6 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered gold_block
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 7 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered bricks
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 8 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered mossy_cobblestone
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 9 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered purpur_block
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 10 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered prismarine
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 11 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered emerald_block
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 12 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered soul_soil
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 13 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered packed_ice
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 14 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered white_wool
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 15 run clone ~ ~ ~ ~20 ~ ~20 ~ ~1 ~ filtered diamond_block

+ 1 - 1
data/mini/functions/colormatch/game/newarray.mcfunction

@@ -1,4 +1,4 @@
-scoreboard players set $randarray_max mem 10
+scoreboard players set $randarray_max mem 8
 scoreboard players operation $randarray_last mem = $color_match_floor mem
 function lib:randarray/call
 data modify storage ltw:mini colormatch.types set from storage lib:randarray out

+ 4 - 1
data/mini/functions/colormatch/game/remove_ground.mcfunction

@@ -1,5 +1,8 @@
 # 去除地板
-execute positioned 1001 11 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
+fill 1049 14 3999 1071 14 4021 air replace #mini:colarmatch_floor
+
+# 替换方块
+execute positioned 1001 11 4000 run clone ~ ~ ~ ~20 ~ ~20 1050 15 4000 filtered #mini:colarmatch_floor
 
 # 告知玩家
 execute as @a at @s run function lib:sounds/hit2

+ 32 - 60
data/mini/functions/colormatch/game/replace_wall.mcfunction

@@ -1,60 +1,32 @@
-execute if score $color_match_floor mem matches 1 run fill 1075 11 3999 1075 40 4025 acacia_planks
-execute if score $color_match_floor mem matches 1 run fill 1075 11 3999 1049 40 3999 acacia_planks
-execute if score $color_match_floor mem matches 1 run fill 1049 11 3999 1049 40 4025 acacia_planks
-execute if score $color_match_floor mem matches 1 run fill 1049 11 4025 1075 40 4025 acacia_planks
-execute if score $color_match_floor mem matches 2 run fill 1075 11 3999 1075 40 4025 birch_planks
-execute if score $color_match_floor mem matches 2 run fill 1075 11 3999 1049 40 3999 birch_planks
-execute if score $color_match_floor mem matches 2 run fill 1049 11 3999 1049 40 4025 birch_planks
-execute if score $color_match_floor mem matches 2 run fill 1049 11 4025 1075 40 4025 birch_planks
-execute if score $color_match_floor mem matches 3 run fill 1075 11 3999 1075 40 4025 bedrock
-execute if score $color_match_floor mem matches 3 run fill 1075 11 3999 1049 40 3999 bedrock
-execute if score $color_match_floor mem matches 3 run fill 1049 11 3999 1049 40 4025 bedrock
-execute if score $color_match_floor mem matches 3 run fill 1049 11 4025 1075 40 4025 bedrock
-execute if score $color_match_floor mem matches 4 run fill 1075 11 3999 1075 40 4025 crimson_planks
-execute if score $color_match_floor mem matches 4 run fill 1075 11 3999 1049 40 3999 crimson_planks
-execute if score $color_match_floor mem matches 4 run fill 1049 11 3999 1049 40 4025 crimson_planks
-execute if score $color_match_floor mem matches 4 run fill 1049 11 4025 1075 40 4025 crimson_planks
-execute if score $color_match_floor mem matches 5 run fill 1075 11 3999 1075 40 4025 warped_planks
-execute if score $color_match_floor mem matches 5 run fill 1075 11 3999 1049 40 3999 warped_planks
-execute if score $color_match_floor mem matches 5 run fill 1049 11 3999 1049 40 4025 warped_planks
-execute if score $color_match_floor mem matches 5 run fill 1049 11 4025 1075 40 4025 warped_planks
-execute if score $color_match_floor mem matches 6 run fill 1075 11 3999 1075 40 4025 gold_block
-execute if score $color_match_floor mem matches 6 run fill 1075 11 3999 1049 40 3999 gold_block
-execute if score $color_match_floor mem matches 6 run fill 1049 11 3999 1049 40 4025 gold_block
-execute if score $color_match_floor mem matches 6 run fill 1049 11 4025 1075 40 4025 gold_block
-execute if score $color_match_floor mem matches 7 run fill 1075 11 3999 1075 40 4025 bricks
-execute if score $color_match_floor mem matches 7 run fill 1075 11 3999 1049 40 3999 bricks
-execute if score $color_match_floor mem matches 7 run fill 1049 11 3999 1049 40 4025 bricks
-execute if score $color_match_floor mem matches 7 run fill 1049 11 4025 1075 40 4025 bricks
-execute if score $color_match_floor mem matches 8 run fill 1075 11 3999 1075 40 4025 mossy_cobblestone
-execute if score $color_match_floor mem matches 8 run fill 1075 11 3999 1049 40 3999 mossy_cobblestone
-execute if score $color_match_floor mem matches 8 run fill 1049 11 3999 1049 40 4025 mossy_cobblestone
-execute if score $color_match_floor mem matches 8 run fill 1049 11 4025 1075 40 4025 mossy_cobblestone
-execute if score $color_match_floor mem matches 9 run fill 1075 11 3999 1075 40 4025 purpur_block
-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 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
-# execute if score $color_match_floor mem matches 13 run fill 1049 11 4025 1075 40 4025 packed_ice
-# execute if score $color_match_floor mem matches 14 run fill 1075 11 3999 1075 40 4025 white_wool
-# execute if score $color_match_floor mem matches 14 run fill 1075 11 3999 1049 40 3999 white_wool
-# execute if score $color_match_floor mem matches 14 run fill 1049 11 3999 1049 40 4025 white_wool
-# execute if score $color_match_floor mem matches 14 run fill 1049 11 4025 1075 40 4025 white_wool
-# execute if score $color_match_floor mem matches 15 run fill 1075 11 3999 1075 40 4025 diamond_block
-# execute if score $color_match_floor mem matches 15 run fill 1075 11 3999 1049 40 3999 diamond_block
-# execute if score $color_match_floor mem matches 15 run fill 1049 11 3999 1049 40 4025 diamond_block
-# execute if score $color_match_floor mem matches 15 run fill 1049 11 4025 1075 40 4025 diamond_block
+execute if score $color_match_floor mem matches 1 run fill 1049 18 4008 1049 22 4012 minecraft:acacia_planks
+execute if score $color_match_floor mem matches 1 run fill 1062 22 4021 1058 18 4021 minecraft:acacia_planks
+execute if score $color_match_floor mem matches 1 run fill 1071 18 4012 1071 22 4008 minecraft:acacia_planks
+execute if score $color_match_floor mem matches 1 run fill 1058 22 3999 1062 18 3999 minecraft:acacia_planks
+execute if score $color_match_floor mem matches 2 run fill 1049 18 4008 1049 22 4012 minecraft:birch_planks
+execute if score $color_match_floor mem matches 2 run fill 1062 22 4021 1058 18 4021 minecraft:birch_planks
+execute if score $color_match_floor mem matches 2 run fill 1071 18 4012 1071 22 4008 minecraft:birch_planks
+execute if score $color_match_floor mem matches 2 run fill 1058 22 3999 1062 18 3999 minecraft:birch_planks
+execute if score $color_match_floor mem matches 3 run fill 1049 18 4008 1049 22 4012 minecraft:bedrock
+execute if score $color_match_floor mem matches 3 run fill 1062 22 4021 1058 18 4021 minecraft:bedrock
+execute if score $color_match_floor mem matches 3 run fill 1071 18 4012 1071 22 4008 minecraft:bedrock
+execute if score $color_match_floor mem matches 3 run fill 1058 22 3999 1062 18 3999 minecraft:bedrock
+execute if score $color_match_floor mem matches 4 run fill 1049 18 4008 1049 22 4012 minecraft:crimson_planks
+execute if score $color_match_floor mem matches 4 run fill 1062 22 4021 1058 18 4021 minecraft:crimson_planks
+execute if score $color_match_floor mem matches 4 run fill 1071 18 4012 1071 22 4008 minecraft:crimson_planks
+execute if score $color_match_floor mem matches 4 run fill 1058 22 3999 1062 18 3999 minecraft:crimson_planks
+execute if score $color_match_floor mem matches 5 run fill 1049 18 4008 1049 22 4012 minecraft:warped_planks
+execute if score $color_match_floor mem matches 5 run fill 1062 22 4021 1058 18 4021 minecraft:warped_planks
+execute if score $color_match_floor mem matches 5 run fill 1071 18 4012 1071 22 4008 minecraft:warped_planks
+execute if score $color_match_floor mem matches 5 run fill 1058 22 3999 1062 18 3999 minecraft:warped_planks
+execute if score $color_match_floor mem matches 6 run fill 1049 18 4008 1049 22 4012 minecraft:gold_block
+execute if score $color_match_floor mem matches 6 run fill 1062 22 4021 1058 18 4021 minecraft:gold_block
+execute if score $color_match_floor mem matches 6 run fill 1071 18 4012 1071 22 4008 minecraft:gold_block
+execute if score $color_match_floor mem matches 6 run fill 1058 22 3999 1062 18 3999 minecraft:gold_block
+execute if score $color_match_floor mem matches 7 run fill 1049 18 4008 1049 22 4012 minecraft:bricks
+execute if score $color_match_floor mem matches 7 run fill 1062 22 4021 1058 18 4021 minecraft:bricks
+execute if score $color_match_floor mem matches 7 run fill 1071 18 4012 1071 22 4008 minecraft:bricks
+execute if score $color_match_floor mem matches 7 run fill 1058 22 3999 1062 18 3999 minecraft:bricks
+execute if score $color_match_floor mem matches 8 run fill 1049 18 4008 1049 22 4012 minecraft:mossy_cobblestone
+execute if score $color_match_floor mem matches 8 run fill 1062 22 4021 1058 18 4021 minecraft:mossy_cobblestone
+execute if score $color_match_floor mem matches 8 run fill 1071 18 4012 1071 22 4008 minecraft:mossy_cobblestone
+execute if score $color_match_floor mem matches 8 run fill 1058 22 3999 1062 18 3999 minecraft:mossy_cobblestone

+ 2 - 2
data/mini/functions/colormatch/game/show_floor_block.mcfunction

@@ -14,5 +14,5 @@ execute if score $color_match_current mem matches 5 run replaceitem entity @s ho
 execute if score $color_match_current mem matches 6 run replaceitem entity @s hotbar.8 gold_block{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
 execute if score $color_match_current mem matches 7 run replaceitem entity @s hotbar.8 bricks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
 execute if score $color_match_current mem matches 8 run replaceitem entity @s hotbar.8 mossy_cobblestone{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
-execute if score $color_match_current mem matches 9 run replaceitem entity @s hotbar.8 purpur_block{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
-execute if score $color_match_current mem matches 10 run replaceitem entity @s hotbar.8 prismarine{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+# execute if score $color_match_current mem matches 9 run replaceitem entity @s hotbar.8 purpur_block{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+# execute if score $color_match_current mem matches 10 run replaceitem entity @s hotbar.8 prismarine{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}

+ 1 - 1
data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -1,7 +1,7 @@
 # 替换墙壁
 function mini:colormatch/game/replace_wall
 # 复制地板
-execute positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
+execute positioned 1001 10 4000 run clone ~ ~ ~ ~20 ~ ~20 1050 15 4000 filtered #mini:colarmatch_floor
 
 # 设置倒计时
 scoreboard players remove $color_match_time mem 3

+ 7 - 9
data/mini/functions/colormatch/game_init.mcfunction

@@ -1,15 +1,13 @@
 # 初始化地图
 forceload add 1001 4000 1075 4025
-fill 1049 10 4025 1075 10 3999 bedrock
-fill 1074 11 4000 1050 11 4024 magma_block
-fill 1074 15 4000 1050 15 4024 stone
-fill 1074 25 4000 1050 25 4024 barrier
-fill 1075 11 3999 1075 40 4025 stone
-fill 1075 11 3999 1049 40 3999 stone
-fill 1049 11 3999 1049 40 4025 stone
-fill 1049 11 4025 1075 40 4025 stone
-fill 1074 40 4000 1050 40 4024 barrier
+setblock 1049 10 3999 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,rotation:"NONE",posX:0,mode:"LOAD",integrity:1.0f,showair:0b,name:"mini:color_match"}
+setblock 1049 11 3999 redstone_block
 
+# 初始化墙壁
+fill 1049 18 4008 1049 22 4012 stone
+fill 1062 22 4021 1058 18 4021 stone
+fill 1071 18 4012 1071 22 4008 stone
+fill 1058 22 3999 1062 18 3999 stone
 
 # 初始化
 scoreboard players set $finish_mode mem 0

+ 12 - 0
data/mini/tags/blocks/colarmatch_floor.json

@@ -0,0 +1,12 @@
+{
+    "values": [
+        "minecraft:acacia_planks",
+        "minecraft:birch_planks",
+        "minecraft:bedrock",
+        "minecraft:crimson_planks",
+        "minecraft:warped_planks",
+        "minecraft:gold_block",
+        "minecraft:bricks",
+        "minecraft:mossy_cobblestone"
+    ]
+}