Port seeded sky colors and Normal Time celestial controls to 26.3
Build / build (push) Canceled after 0s

This commit is contained in:
dnorberg committed 2026-11-03 16:56:07 -05:00
1 parent a7a73d3c17
commit 38e40ddba3
27 files changed
+1516 -35

No files matched your search

+249
View File
@@ -698,6 +698,255 @@ terrain or in spectator mode). The fixture accepts `static` as its sky value.
The dedicated test server was stopped and its temporary world deleted.
Changes remain local; no commit/push/publication was requested.
The local `1.0.1.72-beta.1` slice completes seeded default sky selection for
new Ages. Missing sky pages now choose Overworld, Nether, End, or Static
instead of always Overworld. This applies both to Link-Panel-only books and
authored books without a sky controller. An explicit sky page always wins.
The selection uses the first random draw and seed salt from 1.21.1's
`AgeSkyProfile.random`. Its equally likely Inherited and Overworld slots both
use the native Overworld presentation in this port, giving effective weights
2:1:1:1. Sky uses an independent random stream, so adding sky/weather/lighting
controllers does not reroll the other choices, terrain, or biomes. Colors,
individual celestial bodies, and random feature completion remain pending.
The chosen sky is saved at Age creation and is not recalculated on travel,
reload, restart, or reseed. Existing Ages (including ones with no saved sky
entry) keep their previous presentation. Explicit diagnostic fixtures retain
their controlled defaults; `create_random` uses the same complete environment
resolver as player books. `environment_probe` now also checks every explicit
sky override and cross-controller independence.
For manual checking, create several new Link-Panel-only books and compare
their sky styles. Also author a terrain/biome book without a sky page, and one
with an explicit Overworld Sky page. Revisit/restart to check persistence.
For repeatable operator fixtures, `create_random <name> 0` selects Nether,
seed 2 selects Overworld, seed 6 Static, and seed 8 End. These seeds only test
the current port selection, not complete 1.21.1 world-generation equivalence.
No commit/push/publication is performed until explicitly requested.
The local `1.0.1.73-beta.1` slice ports shared Red/Green/Blue/White/Black
colors and their Number modifiers using the 1.21.1 additive mixing rules.
Numbers 0–24 directly before a color contribute `number × 10`; White adds to
all three channels and Black subtracts from them. Missing channels begin at
zero, groups can be written in any channel order, and the completed result is
clamped to 0–255 per channel. A color without a number gets a deterministic
seeded amount. Numbers currently require a following color: celestial numeric
targets and Static Sky resolution (#109) are not implemented by this slice.
Color groups preceding a Sky page tint that sky; a trailing color group also
tints the sky, matching the existing 1.21.1 behavior. The new **Ambient Light
Color** page (Lighting creative category) consumes the preceding color group
for ambient illumination instead. Author Bright separately when full effective
light level 15 is wanted; this color target does not change stored block light
or the selected lighting controller. A target without a color group leaves
that color native. For example:
`Number 24 → Blue → Overworld Sky → Number 24 → White → Ambient Light Color → Bright`
This gives a blue sky/fog with white ambient illumination. Do not use an
unmodified Blue page when an exact amount is desired: its amount is seeded.
Explicit colors are saved once; they survive reload/reseed/restart. Existing
Ages without a color profile remain native. There are no random color groups
for books that do not contain color pages yet.
Sky colors override the native sky/fog color attributes, tint Static Sky's
animated cells, and multiply the native End background texture. End texture
detail/brightness remains native; a tint does not make it a flat solid color.
Ambient color uses 26.3's native ambient-light attribute. Both profiles sync in
the Age catalog before travel, not through unbounded RGB dimension types.
Client state is replaced with each catalog and cleared on disconnect. Use the
same beta JAR on server and client: the catalog protocol has changed.
Build and dedicated-server checks cover compiled color groups, native fallback,
all four sky types, catalog encoding/decoding, reload and reseed. Client color
rendering and page availability still need manual checking. Test the example
above, a tinted Static/End Sky, return to an uncolored Age/Overworld, and revisit
after restarting. `create_colors <name> <seed> <sky>` creates a repeatable Flat,
Bright fixture with sky `#643296` and ambient `#6496c8`; `color_probe <name>`
checks saved colors against sampled attributes and round-trips the catalog.
No commit/push/publication is performed until explicitly requested.
The local `1.0.1.74-beta.1` slice adds authored day-cycle lengths through the
existing **Normal Time** page. Put one **Half Length**, **Full Length**,
**Double Length**, or **Zero Length** before Normal Time. These use the
1.21.1 period values 0.5, 1, 2, and 0 normal days respectively. Half runs twice
as fast; Double runs half as fast. A Number immediately before a Length page
overrides it with `number × 0.08` days (0–24), including Number 0 for stopped
time. Normal Time without a Length uses one normal day.
Zero Length freezes the native day timelines at a deterministic, saved random
time. It does not snap back to noon on reload/reseed, and contributes no
fractional clock interpolation. A book with no Normal Time page retains the
existing native cycle; missing periods are not randomly completed yet.
Until the full grammar port, a Length requires one following Normal Time page;
repeated Length/Normal Time pages are unsupported.
The implementation wraps only this Age's native Overworld-clock timeline
sampling, on server and client. It does not change the global clock or tick
rate. Native sun/moon angles, sky/fog/day shading, moon phase, and gameplay
attributes supplied by those timelines use the sampled time. Weather layers
and authored colors remain intact. Explicit RGB sky/fog overrides remain
constant rather than acquiring day tint. Global `/time` changes still shift
moving Ages' underlying clock; Zero remains fixed. `/time query` reports the
global clock, not the scaled sample; use `cycle_probe` to inspect the latter.
This controls the existing native pair only. Separate Sun/Moon pages, custom
angles/phases/directions/sizes, per-body colors, eclipses, and random celestial
completion remain pending. Normal Time does not add visible bodies to End,
Nether or Static skies; include Overworld Sky for the visual cycle test.
Client/server must use the same beta: the catalog protocol is now 3.
For manual testing, bind **Link Panel → Half Length → Normal Time → Overworld
Sky** (optionally add Normal Lighting and No Weather), compare with Full and
Double, then try Zero Length and check that the sky stays still without
bouncing. Revisit after restarting. For numeric authoring, put Number 12 before
Full Length for a 0.96-day cycle. Existing Ages are not rewritten. Operator
fixtures: `create_cycle <name> <seed> <half|full|double|zero> [number]` and
`cycle_probe <name>` under `/rivencraft_port age`.
Port build and disposable-server probes passed for all four lengths and
numeric overrides, native fallback, real sun-angle/light differences, catalog
round trips, unload/reload, and reseed preservation. Rendering/travel/reconnect
checks still require manual validation. Changes remain local until explicitly
requested for commit/push/publication.
The local `1.0.1.75-beta.1` slice adds **Rising**, **Zenith**, **Setting**, and
**Nadir** Phase pages and **Clockwise/Counterclockwise** Direction pages to the
native Normal Time cycle. Put these before Normal Time, alongside an optional
Length. This does not implement separate Sun/Moon bodies or rename Normal
Time/Full Length; the naming cleanup is tracked separately in #110.
The phase conversion matches 1.21.1's `applyInitialCelestialPhase`: written
angles start at midnight, while native day time zero is sunrise. Rising,
Zenith, Setting, and Nadir select native times 0, 6000, 12000, and 18000.
A Number immediately before a Phase overrides it with `number × 15°` from
midnight; Number 6 means sunrise, 12 noon, 18 sunset, and 0 or 24 midnight.
These are native day-time positions, not uneased geometric sun angles.
Written phase is anchored when the Age is created, independently of the
current Overworld time and Length. Moving cycles then progress from that
saved point. Counterclockwise runs the cycle backward; Clockwise is the
default. This reverses the Age's day timelines, including their moon-phase
and gameplay attributes, not just a visual disc. The global clock is untouched.
As before, global `/time` changes can shift moving samples.
With Zero Length, written Phase replaces the seeded random stopping time:
Zero + Zenith stays at noon, Zero + Nadir at midnight. Direction has no motion
to reverse in a stopped cycle. Without a Phase, old behavior and saved Ages
are preserved. Origins, phase offsets, and direction survive reload, restart,
and reseed. Old profile fields default to origin/offset zero and forward
motion. The catalog protocol is now 4; server and client need the same beta.
Interim grammar permits at most one each of Length, Phase and Direction before
one Normal Time target. Angle/bearing, size, multiple bodies and eclipses remain
unsupported. No random phase/direction completion was added. Example visual
checks (include Link Panel, Overworld Sky, Normal Lighting and No Weather):
- `Zero Length → Zenith → Normal Time`: frozen noon, including after restart.
- `Zero Length → Nadir → Normal Time`: frozen midnight.
- `Half Length → Zenith → Counterclockwise → Normal Time`: starts at noon and
travels backward, twice as fast. Compare with Clockwise.
- `Zero Length → Number 6 → Nadir → Normal Time`: Number overrides Nadir to sunrise.
Operator fixture: `/rivencraft_port age create_phase <name> <seed> <length>
<rising|zenith|setting|nadir> <clockwise|counterclockwise> [phaseNumber]`.
`cycle_probe` reports both the saved origin and current native/scaled samples.
Build and disposable-server checks cover named/numeric phases, opposite motion,
fixed day/night light levels, older profile defaults, catalog round trips,
reload and reseed. Client rendering/reconnect checks remain manual. Changes
remain local until explicitly requested for commit/push/publication.
The local `1.0.1.76-beta.1` slice ports **North/East/South/West Angle** pages
for the native Normal Time cycle. Their bearings match the 1.21.1 symbol
values: 0°, 90°, 180°, and 270°. Put at most one Angle before Normal Time.
A Number immediately before it overrides the bearing with `number × 15°`,
wrapping at 360°: Number 3 is 45°, Number 12 is 180°, and Number 24 returns
to 0°. Angle is the orbit's horizontal bearing, distinct from Phase (position
along that orbit) and Direction (which way time progresses).
The client uses the extracted saved bearing to rotate the native sun/moon
path, star field, and sunrise/sunset glow together. The native buffers,
textures, phase, and lighting tracks are retained. Bearing does not change
altitude, day length, light levels, or clock direction. Without an Angle page,
the existing native orientation is preserved; old profiles use the same
fallback. No seeded random bearing completion was added. This does not add
bodies to Nether/End/Static skies or port custom Sun/Moon counts, sizes,
per-body colors, or eclipses. #110 naming work remains separate.
Bearing persists in the existing cycle profile and catalog; the catalog
protocol is now 5, requiring the same beta on server and client. Extracted
bearing resets with sky state and is replaced at each render, preventing an
Age's orientation from leaking into the next world. Sunrise/sunset glow is
rotated relative to the native -90° body-path orientation, not around a
different axis. No new textures or dimension variants are required.
Visual check: bind **Link Panel → Zero Length → Rising Phase → North Angle →
Normal Time → Overworld Sky** (Normal Lighting/No Weather help comparison).
Compare with East/South/West Angle, then put Number 3 before North Angle for
a 45° intermediate bearing. Use Rising/Setting rather than Zenith when
checking bearing: a body directly overhead stays overhead under a horizontal
rotation. Check the glow stays aligned, then travel to an unmodified Age or
Overworld and revisit after restart.
Operator fixture: `/rivencraft_port age create_angle <name> <seed>
<north|east|south|west> [number]` creates a frozen sunrise for comparison.
The fixture validates all 25 numeric overrides, cardinal values, timing
independence, older profile defaults and catalog codec round trips. Dedicated
checks cover persistence and unchanged sampled day lighting; actual rendered
orientation remains a manual check. No commit/push/publication is performed
until explicitly requested.
The local `1.0.1.77-beta.1` slice fixes automatic sky selection for authored
celestials. **Normal Time without a Sky page now selects Overworld Sky**,
the current port's celestial-capable style, instead of sometimes selecting
Nether/End/Static and hiding the native bodies. Explicit Sky pages retain
precedence. Books without celestial pages retain the existing seeded sky
distribution, and lighting/weather choices are unchanged. The resolver also
recognizes Sun/Moon page intentions for their eventual port; this does not
make those still-unported body pages bindable.
This matches the visible outcome of the current bundled 1.21.1 Age path:
its native fallback is Overworld, and its custom sky renderer draws authored
suns/moons over its backgrounds. No 1.21.1 change or follow-up issue is needed
for those bundled paths. The fix applies at creation of new 26.3 Ages; it
does not rewrite existing saved sky choices. Recreate an older affected book
to test the corrected automatic choice. Weather and terrain can still obscure
celestials naturally; this is a compatible-sky rule, not a guarantee of a clear
view from underground or during storms.
Test **Link Panel → Normal Time**, optionally with No Weather and Normal
Lighting, but without any Sky page. The celestial view should be present.
Also test Length/Phase/Angle/Direction + Normal Time without a Sky page and
confirm that an explicit Sky page still wins. `create_cycle` now exercises
this missing-Sky path rather than forcing an explicit sky in its fixture.
`environment_probe` verifies all three celestial intentions, explicit Sky
precedence in either order, and unchanged lighting/weather selection.
No commit/push/publication is performed until explicitly requested.
The local `1.0.1.78-beta.1` slice ports **Small/Normal/Large Celestial**
Size modifiers for Normal Time: 0.5×, 1× and 2× respectively. A Number page
immediately before Size overrides that preset with the existing 1.21.1
0.25×–3× range (Number 0 = 0.25×, 12 = 1.625×, 24 = 3×).
As in 1.21.1, Size before Normal Time sizes its sun; the paired moon stays
normal-sized. Standalone Sun/Moon and independent body sizing remain unported.
Size changes neither day length nor illumination, phase or bearing. Older
profiles default to 1×; new profiles retain size through reload/restart/reseed.
The catalog protocol is now 6, so clients and servers must use matching builds.
Rendering retains the native sun texture/pipeline without new GPU buffers.
Test **Link Panel → Zero Length → Zenith Phase → Large Celestial → Normal
Time**, optionally with No Weather and Normal Lighting. Compare Small and
Normal, then Number 0/12/24 immediately before Size. No Sky page is needed.
The sun should change size, while the moon and Overworld remain unchanged.
Reopen the world to check persistence. `create_size <name> <seed>
<small|normal|large> [number]` creates a frozen-noon fixture without explicit
Sky; `cycle_probe <name>` reports its saved size and catalog round trip.
Build and disposable-server checks passed, including all numeric sizes,
reload, reseed, restart and unchanged sampled lighting/time. Actual rendered
size remains a manual check. The test server stopped and its world was deleted.
No commit/push/publication is performed until explicitly requested.
From the repository root:
```sh