Skip to content
This repository was archived by the owner on Apr 9, 2026. It is now read-only.

Commit d71287f

Browse files
authored
Create time_phase.mcfunction
1 parent 3f6eb3c commit d71287f

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# ─────────────────────────────────────────────────────────────────
2+
# macro:world/time_phase
3+
# 26.1+ World Clocks uyumlu zaman fazı belirleme
4+
#
5+
# OUTPUT:
6+
# macro:output.phase → "dawn" / "day" / "dusk" / "night"
7+
# macro:output.daytime → raw daytime tick (0–23999)
8+
# macro:output.is_day → 1b (gündüz)
9+
# macro:output.is_night → 1b (gece)
10+
# macro:output.is_dawn → 1b (şafak)
11+
# macro:output.is_dusk → 1b (alacakaranlık)
12+
# ─────────────────────────────────────────────────────────────────
13+
14+
# Gün içi zamanı al (26.1+ doğru syntax)
15+
execute store result score $tp_t macro.tmp run time of minecraft:overworld query day
16+
17+
# Raw daytime değerini storage'a yaz
18+
execute store result storage macro:output daytime int 1 run scoreboard players get $tp_t macro.tmp
19+
20+
# Boolean flag'leri sıfırla
21+
data modify storage macro:output is_day set value 0b
22+
data modify storage macro:output is_night set value 0b
23+
data modify storage macro:output is_dawn set value 0b
24+
data modify storage macro:output is_dusk set value 0b
25+
26+
# Boolean değerleri ayarla
27+
execute if score $tp_t macro.tmp matches 0..12999 run data modify storage macro:output is_day set value 1b
28+
execute if score $tp_t macro.tmp matches 13000..23999 run data modify storage macro:output is_night set value 1b
29+
execute if score $tp_t macro.tmp matches 0..999 run data modify storage macro:output is_dawn set value 1b
30+
execute if score $tp_t macro.tmp matches 12000..13799 run data modify storage macro:output is_dusk set value 1b
31+
32+
# Faz ismini belirle
33+
execute if score $tp_t macro.tmp matches 0..999 run data modify storage macro:output phase set value "dawn"
34+
execute if score $tp_t macro.tmp matches 1000..11999 run data modify storage macro:output phase set value "day"
35+
execute if score $tp_t macro.tmp matches 12000..13799 run data modify storage macro:output phase set value "dusk"
36+
execute if score $tp_t macro.tmp matches 13800..23999 run data modify storage macro:output phase set value "night"
37+
38+
# Debug mesajı (isteğe bağlı)
39+
tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"world/time_phase ","color":"aqua"},{"storage":"macro:output","nbt":"phase","color":"green"},{"text":" t=","color":"gray"},{"storage":"macro:output","nbt":"daytime","color":"white"}]

0 commit comments

Comments
 (0)