Expand description
The clock, read from the pinned game (spec-0081): the moon’s eight phases, the sun’s eased path, the sky-light and monster-burn keyframes, and the twelve ticks a body’s position names.
The game’s clock is one number, dayTime. time set writes it absolutely;
time query daytime reads it modulo 24000 and time query day divided by
it; the moon’s phase is that quotient modulo 8. Clock is that number
split the way the two read-backs split it.
§One authority
data/timeline-day-1.21.11.json and data/timeline-moon-1.21.11.json are
data/minecraft/timeline/day.json and moon.json of the pinned server jar,
byte for byte plus one trailing newline (tools/maintenance/extract-timelines.py
checks them against the jar; provenance in crates/delvec/data/PROVENANCE.md).
Every value below that the game owns is read from them and from nothing
typed here: the phase names and their order, the sun_angle keyframes and
their cubic-bezier ease, the sky_light_level ramp and the monsters_burn
window.
§The position table is derived, then frozen
position_tick is twelve integer constants, because the emission path
carries no trigonometry (ADR-0006). the_position_table_is_the_curve
re-derives every one from the vendored track, the client’s two sky-quad
constants and the disc fraction of the celestial textures, and fails when a
constant differs from its derivation by a tick.
Structs§
- Celestial
Time - A sky stated in a designer’s words: one body, where it stands, and —
where the moon shows — its phase (spec-0081 §3.1). Exactly one of
sunandmoon(DW0931). - Clock
- The clock one time value sets:
dayTimesplit the way the game’s two read-backs split it. Two time values are equal when their clocks are. - Moon
Phase - One of the moon’s eight phases, held as its index (0 =
full-moon, the phase of day 0). Written in a document as the pinned game’s own name, kebab-cased; the names are DATA, read from the vendoredmoon.json, never an enum this engine authors (spec-0039: vanilla registry values are data).
Enums§
- Body
- A body in the sky: the sun or the moon. The moon stands exactly opposite
the sun (
moon_angleissun_angle+ 180), so the two are one position seen from two sides. - Celestial
Site - Where a celestial time is written, for the rules of its shape (
DW0931). - Position
- Where a body stands on its arc — one point of it, defined by the body’s drawn disc and the horizon (spec-0081 §3.2).
Constants§
- DAY_
TICKS - Ticks in one day:
time query daytimeisdayTimemodulo this. - MOON_
DISC_ HALF_ CENTIDEG - Half the moon’s drawn disc:
atan(20 × 8/32 / 100)= 2.86° (MOON_SIZE20). - POSITIONS
- Every position, in declaration order.
- SUN_
DISC_ HALF_ CENTIDEG - Half the angle the sun’s DRAWN disc spans, in hundredths of a degree:
atan(30 × 8/32 / 100)= 4.29° — the client’sSUN_SIZE30 at height 100, of which the texture’s full-brightness disc is 8 of 32 pixels.
Functions§
- altitude_
of_ angle - Altitude in degrees of a body standing
angledegrees from the zenith. - day_
ease - The ease a track declares, as the file spells it (
None= linear). - day_
keyframes - A track’s keyframes as
(ticks, value), in file order — what a test reads the game’s numbers back through. - degrees_
label - An altitude in hundredths of a degree, as a message prints it:
+2.86°. - monsters_
burn - Whether the
gameplay/monsters_burntrack of the pinned day timeline is on at adaytimetick (a step track: the value of the last keyframe at or before the tick, wrapping). - monsters_
burn_ switches - The two ticks the
monsters_burntrack switches at:(off, on)— 12542 and 23460 in the pinned file. - moon_
cycle_ days - The moon cycle in days: the number of phase keyframes.
- moon_
period_ ticks - The
time_checkperiod over which a predicate reads the phase: the moon timeline’s own period. - moon_up
- Whether the moon is at or above the horizon at a
daytimetick: from the sun’s setting to its rising, both inclusive (the moon’s centre is on the horizon at those two ticks). - phase_
names - The moon’s eight phases, kebab-cased, in the pinned
moon.json’s order: indexiis the phase of dayimodulo 8. - position_
altitude_ centideg - The named body’s altitude at
pos, in hundredths of a degree, by the position’s definition. - position_
tick - The
daytimetick at whichbodystands atpos— the integer nearest the pinned track’s solution. Derived once and frozen; the testthe_position_table_is_the_curvere-derives every entry. - shape_
findings - The rules of one celestial value’s shape (spec-0081 §6), as the message
each broken rule earns — empty when the value is well formed. One function,
so
delvec validate(the world, every cut, every design row) and the camera record’s reader say the same sentence about the same value. - sky_
is_ dark - Whether the pinned day timeline’s visible sky is dark at a
daytimetick: the tick lies on the night plateau ofvisual/sky_color— between two consecutive keyframes that both carry a value other than the day’s first (ticks 13670..=22330 at the pin, where the sky is multiplied by black). Outside it the sky is lit or in its dusk or dawn ramp. Read off the vendored file, never typed. - sky_
light_ factor - The
gameplay/sky_light_levelmultiplier of the pinned day timeline at adaytimetick: 1.0 on the day plateau, 4/15 on the night plateau, linear ramps between. - sun_
altitude_ degrees - The sun’s altitude above the horizon, in degrees, at a
daytimetick: the body travels a great circle through the zenith, so an angleαfrom the zenith is an altitude of90 − αon the western half of the arc andα − 270on the eastern half. Piecewise linear in the angle — no trigonometry. - sun_
angle_ degrees - The
visual/sun_angleof the pinned day timeline at adaytimetick, in degrees: 0 at noon, growing westward, 180 at midnight. The moon’s angle is this plus 180 (moon_angleis the same track at 540 → 180). - sun_
is_ west - Whether the sun at this
daytimestands on the western half of its arc — past noon and before midnight. At noon and midnight exactly the side means nothing and this answersfalse(east), so a value is a function of the tick alone.