Files
beacon_colors
Code
47 172
beacon_colors/data/beacon_colors/functions/apply.mcfunction
kill @e[type=minecraft:marker,tag=beacon_target]
scoreboard players set #beacon_scan_y beacon_scan_y 0
scoreboard players set #beacon_scan_z beacon_scan_z 0
execute positioned ~-16 ~-8 ~-16 run function beacon_colors:scan_z
execute unless entity @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] run tellraw @s {"text":"No beacon was found within 16 blocks.","color":"red"}
execute if score #beacon_color beacon_color matches 1 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:air replace
execute if score #beacon_color beacon_color matches 1 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Default.","color":"green"}
execute if score #beacon_color beacon_color matches 2 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:white_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 2 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to White.","color":"green"}
execute if score #beacon_color beacon_color matches 3 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:orange_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 3 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Orange.","color":"green"}
execute if score #beacon_color beacon_color matches 4 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:magenta_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 4 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Magenta.","color":"green"}
execute if score #beacon_color beacon_color matches 5 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:light_blue_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 5 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Light Blue.","color":"green"}
execute if score #beacon_color beacon_color matches 6 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:yellow_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 6 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Yellow.","color":"green"}
execute if score #beacon_color beacon_color matches 7 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:lime_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 7 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Lime.","color":"green"}
execute if score #beacon_color beacon_color matches 8 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:pink_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 8 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Pink.","color":"green"}
execute if score #beacon_color beacon_color matches 9 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:gray_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 9 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Gray.","color":"green"}
execute if score #beacon_color beacon_color matches 10 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:light_gray_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 10 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Light Gray.","color":"green"}
execute if score #beacon_color beacon_color matches 11 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:cyan_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 11 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Cyan.","color":"green"}
execute if score #beacon_color beacon_color matches 12 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:purple_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 12 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Purple.","color":"green"}
execute if score #beacon_color beacon_color matches 13 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:blue_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 13 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Blue.","color":"green"}
execute if score #beacon_color beacon_color matches 14 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:brown_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 14 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Brown.","color":"green"}
execute if score #beacon_color beacon_color matches 15 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:green_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 15 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Green.","color":"green"}
execute if score #beacon_color beacon_color matches 16 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:red_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 16 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Red.","color":"green"}
execute if score #beacon_color beacon_color matches 17 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:black_stained_glass_pane replace
execute if score #beacon_color beacon_color matches 17 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon color changed to Black.","color":"green"}
execute if score #beacon_color beacon_color matches 18 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run setblock ~ ~1 ~ minecraft:budding_amethyst replace
execute if score #beacon_color beacon_color matches 18 positioned as @e[type=minecraft:marker,tag=beacon_target,sort=nearest,limit=1] if block ~ ~ ~ minecraft:beacon run tellraw @s {"text":"Beacon beam hidden with Invisible mode.","color":"green"}
kill @e[type=minecraft:marker,tag=beacon_target]