From 2328af6bd84d73b3d2306b839877c9001fa94a1e Mon Sep 17 00:00:00 2001 From: ChenCMD Date: Sat, 21 Feb 2026 16:54:10 +0900 Subject: [PATCH] =?UTF-8?q?:technologist:=20tellraw=20=E3=82=92=E5=87=BA?= =?UTF-8?q?=E5=8A=9B=E3=81=94=E3=81=A8=E3=81=AB=E5=88=A5=E3=81=AE=E8=89=B2?= =?UTF-8?q?=E3=81=A7=E5=87=BA=E5=8A=9B=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AA=20debug=20fn=20=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...print_with_alternating_colors.m.mcfunction | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 TheSkyBlessing/data/debug/functions/print_with_alternating_colors.m.mcfunction diff --git a/TheSkyBlessing/data/debug/functions/print_with_alternating_colors.m.mcfunction b/TheSkyBlessing/data/debug/functions/print_with_alternating_colors.m.mcfunction new file mode 100644 index 0000000000..d3fda018e7 --- /dev/null +++ b/TheSkyBlessing/data/debug/functions/print_with_alternating_colors.m.mcfunction @@ -0,0 +1,20 @@ +#> debug:print_with_alternating_colors.m +# +# tellraw を出力ごとに別の色で出力します +# +# @input args +# Message: string (TextComponent) | TextComponent +# @api + +#> private +# @private +#declare storage debug:print_with_alternating_colors + +# "odd" <=> "even" + execute if data storage debug:print_with_alternating_colors {n:"odd" } run data modify storage debug:print_with_alternating_colors n set value "temp" + execute unless data storage debug:print_with_alternating_colors {n:"temp"} run data modify storage debug:print_with_alternating_colors n set value "odd" + execute if data storage debug:print_with_alternating_colors {n:"temp"} run data modify storage debug:print_with_alternating_colors n set value "even" + +# 出力 + $execute if data storage debug:print_with_alternating_colors {n:"odd" } run tellraw @a {"text":"","extra":$(Message),"color":"#FFFFFF"} + $execute if data storage debug:print_with_alternating_colors {n:"even"} run tellraw @a {"text":"","extra":$(Message),"color":"#C0C0C0"}