Commit Graph

524 Commits

Author SHA1 Message Date
Ludovic Marie 831cd657de Merge remote-tracking branch 'origin/docs/modpacks-structure-libraries' into integ/mp6 2026-10-18 13:23:07 +02:00
Ludovic Marie 2efa0d65b5 Merge remote-tracking branch 'origin/feat/mod-structure-set-additions' into integ/mp6 2026-10-18 13:23:05 +02:00
Ludovic Marie 1b6a3cf535 Docs: modpacks, the structure libraries Horizon now runs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 11:41:27 +02:00
Ludovic Marie 845a122faa Merge pull request #758 from rdbtCVS/perf/portal-section-mask
🤖 Agent: Merged. CI parity passed 88 of 89 harnesses. The one miss, dedicated_server (a known intermittent failure), passes locally on this head. Thanks rdbt!
2026-10-18 11:01:13 +02:00
Ludovic Marie 817a71ffa5 Clients keep the light the server sends; the server sends light updates
A remote client (a LAN guest, or the game on its server thread) threw away
the light in each LevelChunkWithLight and relit the column and its
neighbours itself. It now applies the sky and block layers as
ClientPacketListener.applyLightData does, and relights only block changes,
as vanilla's client does.

The hub now sends ClientboundLightUpdatePacket for the light sections that
changed in a column to the players for whom it is on the tracked border
(ChunkHolder.broadcastChanges), so light from blocks a guest doesn't track
reaches it.

horizon-ctl gains 'light X1 Y1 Z1 X2 Y2 Z2', and lan_e2e a 'light' check
comparing the guest's light with the host's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 09:39:50 +02:00
Ludovic Marie d85a3603bd Merge pull request #761 from rdbtCVS/t3code/9960489f
🤖 Agent: merged rdbt's paletted container access (BlockSection::set 1.12x; identical palette, counts and NBT; CI parity green).
2026-10-18 09:33:45 +02:00
Ludovic Marie 1ccc41c8b2 Content mods: add to other structure sets and pools (horizon:add_to)
A content mod's structure set or template pool file holding
"horizon:add_to" appends its entries to the sets or pools it names
(vanilla's, another mod's) instead of being one of its own, as
lithostitched's add_structure_set_entries and add_template_pool_elements
modifiers do on NeoForge and Fabric. The content root merges them after
every mod's own files, in mod and file order; a name nobody defines is
skipped. Vanilla data never has the key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 08:56:01 +02:00
Ludovic Marie 1d937524a9 Merge pull request #826 from ludovic111/docs/modpacks-structures
🤖 Agent: merged: docs/modpacks.md. Combined check of main + modpacks-5's six: clippy, tests, worldgen structure_density block_properties registry_fluid chunk_stage PASS.
2026-10-18 08:53:03 +02:00
Ludovic Marie 454b3842bb feat(server): secure chat, as vanilla 26.3's server
Chat session updates with their profile key checked against the services'
keys, signed chat and the message chain, last-seen acknowledgements, the
signature cache, signed say/me/msg, enforce-secure-profile, and vanilla's
log lines. Offline servers and players without a chat session chat
unsigned, as on vanilla. tools/test_secure_chat_parity.py compares both
servers with test keys and a mock services server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 07:52:46 +02:00
Ludovic Marie 05517a167f docs/modpacks.md: structure carry-over now decodes and starts where the mod would; facts.json streams
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 07:40:41 +02:00
Ludovic Marie 6e7b34d5b8 Merge remote-tracking branch 'pr/790' into integ/mp-sh 2026-10-18 06:34:57 +02:00
Ludovic Marie 8a1515b64f Merge remote-tracking branch 'pr/765' into integ/mp-sh 2026-10-18 06:34:07 +02:00
rdbtCVS 4cfa6a507c Document incremental surface optimization measurements 2026-10-18 03:11:34 +01:00
Ludovic Marie 4ac29bf1c1 docs(hosting): players travel between dimensions on their own
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 03:01:56 +02:00
rdbtCVS 5c55e7d855 Paletted container access: skip the storage revalidation a section already did
BlockSection::get and set check the section index and the state id once,
then read and write through new PackedStorage::read/write, which skip the
storage-level bounds and value checks and the Result that get/set keep for
external callers. A section index is below 4,096 and a palette id always
fits the width bits_for_palette chose; both methods debug_assert that
contract. Used for the hot read, the hot write and the growth re-encode.

Benchmark (ignored tests, best of alternating-order rounds, fast profile):
BlockSection::set 13.15 -> 9.12 ns/write (1.44x), get 2.33 -> 1.45 ns/read
(1.61x). See docs/performance/paletted-container-access-results.md.
2026-10-17 23:23:15 +01:00
Ludovic Marie 90053d15aa docs/modpacks.md: memory, NeoForge comparison, worldgen and Chipped status
The NBT tables stream, the fluid tables reuse the game's facts and the content
root is kept between starts (#753, #754, #756). Horizon with ATM10's 40 data-tier
mods against the same mods on NeoForge 21.1.259. Worldgen carry-over and what it
does not cover yet (#763, #764). Chipped's harness row with its self-drop tables
(#762). The overlay cache line said it was cached; it is now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 23:45:43 +02:00
rdbtCVS 56a251eb13 Paletted container access: one palette probe per write, dispatched unpack
BlockSection::set resolved the old cell through get and then probed the
section palette three times per non-trivial write: keying the old state by
id, testing the incoming state and finding it. The slot at the written index
already is the old state's id, so read it straight from storage and resolve
only the incoming state, with a single map probe. Palette reuse, free slots
and growth are unchanged, so palette, counts, free list and NBT are identical.

PalettedContainer::unpack and unpack_u16 matched the palette variant inside
the per-cell loop; dispatch Single/List/Global once before it.

Measured against copies of the pre-optimization code (ignored tests):
BlockSection::set 12.73 -> 11.37 ns/write (1.12x), unpack list 1.956 ->
1.860 us/call (1.05x), global 2.255 -> 2.172 (1.04x). See
docs/performance/paletted-container-access-results.md.

set_matches_baseline_under_random_edits drives both implementations over the
same 50k-edit streams for 1/2/16/17/24/64 distinct states, with periodic
whole-section collapses, and asserts equal results, bits, palette, counts,
free list and NBT.
2026-10-17 22:38:35 +01:00
rdbtCVS c4cc7954ce Portal scans: keep per-chunk section masks across ticks
The nether-portal section precheck from #661 answered "does this section's
palette hold a portal?" per section, per tick. Keep the answer per resident
chunk in `portal_sections`, keyed by a weak handle: an edit or a chunk
replacement rebuilds it, and it is dropped when a chunk unloads and cleared
when the block facts change, so a portal block always forces the sweep. The
entity sweep now finds portal blocks without the per-tick map.

This is a scan microbenchmark, not a whole-game claim: steady improves 2.4x
to 17x over the fixtures and the run parity-checks the cached and per-tick
answers. Rescanning every chunk every tick (cold, reload, edit_all) is slower
because a miss reads all 24 sections of a chunk; see
docs/portal-scan-benchmark.md.
2026-10-17 22:29:59 +01:00
Ludovic Marie f227d04f79 Merge pull request #715 from ludovic111/fix/vsync-windowed
🤖 Agent: merged by Ludovic's AI agent: verify passed, parity proven (CI or perf-frame-2's local run), before/after numbers and screenshots in the PR body.
2026-10-17 21:42:36 +02:00
Ludovic Marie 4a56e505aa Merge pull request #671 from ludovic111/docs/host-a-server
🤖 Agent: merged by Ludovic's AI agent: hosting guide with the new benchmark numbers; docs only, verify passed.
2026-10-17 20:23:11 +02:00
Ludovic Marie 68b0ad8199 Hosting guide: movement checks are in (#586), benchmark on main 7bbbf6e9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:13:26 +02:00
Ludovic Marie 09e179804c Merge pull request #680 from ludovic111/perf/mod-content-memory
🤖 Agent: merged by Ludovic's AI agent. Parity 291/291 on the head; combined with main locally: workspace clippy clean, client/world tests pass, mob_ai/save_roundtrip/spawner PASS. ATM10 registry 249 → 125 MB, vanilla 46 → 24 MB.
2026-10-17 19:41:47 +02:00
Ludovic Marie 9403347d13 Merge pull request #732 from ludovic111/docs/website-screenshots
🤖 Agent: merged by Ludovic's AI agent: images, captions and LEGAL.md only; verify passed; screenshots reviewed at full size.
2026-10-17 19:40:35 +02:00
Ludovic Marie c12e1dcd91 Website and README: fresh in-game and menu screenshots from today's Horizon
Six scenes from one fixed-seed world (seed 8675309): a plains village among
savanna hills, sunset over it and the river, moonrise over its lit square, a
crimson forest with a zombified piglin, tropical fish over a warm-ocean coral
reef, and survival at dusk with a zombie and the full HUD. Plus Horizon's own
title, Singleplayer, Video options and pause screens.

Captured with horizon-ctl screenshot from the offscreen client (fullscreen
2560x1286 on the Mac mini, default graphics settings, GUI scale Auto), scenes
cropped to 16:9 and menus to 16:10 (left-aligned) and scaled to the old sizes
(1600x900, 1280x800). The scene sources are JPEGs in docs/media again, the
names scripts/assets.mjs already reads; the README's WebP copies are the
rebuilt website media. Alt texts and LEGAL.md follow the new pictures.

The launcher screenshots are unchanged: the Mac mini's session is locked, so
no window capture works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:38:37 +02:00
Ludovic Marie a6592eb188 Merge main into feat/wide-block-states
lan/chunks.rs: #706's per-section block entity lists carry u32 states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 17:31:24 +02:00
Ludovic Marie 897cd7a1b7 Hosting guide: names you add are accounts (#589, #694), the locator bar is in, HORIZON_ONLINE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:57:47 +02:00
Ludovic Marie 900e0af776 Merge commit 'HEAD@{1}' into HEAD 2026-10-17 16:51:55 +02:00
Ludovic Marie eda6e4b510 Merge feat/wide-block-states (with origin/main) into perf/mod-content-memory
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:32:46 +02:00
Ludovic Marie 4fffbaa1c7 Merge origin/main into docs/host-a-server 2026-10-17 16:06:56 +02:00
Ludovic Marie f537c84ebb VSync on waits for the display whatever the present mode (#684)
With an explicit Present Mode (Mailbox, Immediate), the VSync option did
nothing: the setting replaced vanilla's choice even with VSync on, so a
window kept running uncapped. Vanilla's VSync means Fifo, in a window and in
fullscreen alike. Now VSync on always presents with Fifo, and the Present
Mode setting chooses only while VSync is off (Auto keeps vanilla's choice:
Immediate, else Mailbox, else Fifo). The choice is one tested function,
window::chosen_present_mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:04:00 +02:00
Ludovic Marie a60519eb63 Merge origin/main into feat/wide-block-states
The LAN chunk encoder's section cache (#623) and dimension range (#668)
are kept; a cached section's wire bytes use the registry's palette width,
set once per process before any encoder exists, so the cache stays keyed
on the section alone. The sculk scan's palette check takes the u32 state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:02:53 +02:00
Ludovic Marie 732e77a7ad Merge pull request #694 from ludovic111/feat/server-usercache-2
usercache.json, and console names resolved through it as vanilla does (stacked on #589)
2026-10-17 14:56:05 +02:00
Ludovic Marie 042f634c7a Hosting guide: link the locator bar PR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:32:45 +02:00
Ludovic Marie 3135e1e3d1 Merge pull request #681 from ludovic111/fix/carry-unreadable
Carry: leave out the files the content loader would refuse
2026-10-17 12:39:21 +02:00
Ludovic Marie ed3ad72588 Merge pull request #653 from ludovic111/feat/port-pack-fetch
horizon-port-pack: a library, fetch and port; CurseForge zips name their mods
2026-10-17 12:39:13 +02:00
Ludovic Marie 74da721249 Hosting guide: online mode is merged, the 10-17 benchmark, working links
Online mode checks accounts since v2026.10.17.07; until #589, players added
before they join get offline UUIDs, with a workaround. Portals follow a
lone player since v2026.10.17.09. Copied game files need v2026.10.17.07 or
newer. Section 10 links the 2026-10-17 benchmark and says plainly that 25
moving players are too many for now. Links to other docs are absolute, so
they work both on GitHub and on the site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:37:16 +02:00
Ludovic Marie b859b22111 Keep usercache.json and find console players through it, as vanilla
Port CachedUserNameToIdResolver to the dedicated server, in place of the
in-memory name cache: usercache.json in the universe folder is loaded at
startup (bad entries skipped, a bad date warned about), players are added
when they join and kept for a month, and the file keeps the 1000 most
recently used, newest first, as Gson writes it.

The console's op, deop, ban, pardon and whitelist find players by name
through it, in any case. A name it doesn't hold is asked of the profile
service (profiles::find_by_name) on offline servers too, as vanilla does;
one the service doesn't know is the offline player of the lower-case name
on an offline server, and "That player does not exist" on an online one.

tools/test_user_cache_parity.py runs vanilla's server and Horizon's with a
mock profile service and compares the replies, the names looked up and the
files; the dedicated-server harness now compares usercache.json too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:33:02 +02:00
Ludovic Marie 1f1d5a5aa4 Carry: leave out the files the content loader would refuse
Vanilla skips a resource with an invalid path, a data file that does not
parse, one at a time; Horizon's content loader refuses the whole mod
set. carry now keeps them in outside/ with the reason (report
`unreadable`): upper-case paths, JSON that does not parse, shared
tags with "replace": true. A byte-order mark is dropped.

ATM10's 42 carried mods: 19 such files in 7 mods (Mekanism Tools'
ry_UA lang, CTOV's empty tag, Towns and Towers' replacing tags, broken
template pools, recipes and a lang file), and the 42 load as carried.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:53:46 +02:00
Ludovic Marie ed9a25ad49 Measure where content mods' memory goes; drop the registry's second copy
- perf_bench.py samples the physical footprint on macOS as well as
  RSS. RSS counts the pages the allocator freed and marked reusable,
  so the six mods' "+1.1 GB" is about 0.5 GB of footprint.
- examples/resource_memory.rs: live heap, peak, RSS and footprint after
  each resource loader, for a prepared or a content-mod root.
- BlockRegistry indexes ids by a hash of the state, checked against
  the states, instead of keeping every state twice: -22 MB live for
  vanilla, -124 MB for ATM10's 42 mods (193,762 states).
- docs/modpacks.md: the per-loader breakdown and the next cut (the
  per-state tables parsed whole at startup).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:44:05 +02:00
Ludovic Marie bc69b88c5d Merge pull request #587 from ludovic111/feat/server-online-mode
Dedicated server: online mode, and refused logins in the log
2026-10-17 09:14:16 +02:00
Ludovic Marie 4d1596fe3b Load ATM10's 42 carried mods: room past 8,192 textures and tags
With the wide state ids, ATM10's 42 data-tier mods (193,762 states)
reach the world once these loaders stop refusing them:

- Block sprites: eight texture arrays of 2048 layers instead of four
  (9,790 block textures for the 42).
- Per-state tables read as NBT: the table limits cover 2^20 states, and
  the collision table in level data uses them.
- Worldgen block tags: 2^20 blocks instead of 8,192 (mineable/pickaxe
  holds every stone block of a pack).
- As vanilla's loaders do, a blockstate definition that does not bind,
  a missing or broken block model of a mod, and a recipe that does not
  parse are logged and skipped instead of dropping every mod (or
  stopping the game).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 09:12:41 +02:00
Ludovic Marie 57ee531c63 Host a server: a guide in docs/hosting.md, and the site's /server page built from it
What works on main today (install, game files, first run, server.toml, the commands, the web panel,
backups, services, Docker built by hand) and, plainly, what doesn't yet: offline mode only, no
published image, no secure chat or locator bar, the open PRs that are coming. The site renders the
guide into /server at build time, so it has one source. The CSP hashes now cover every page's inline
script, so the privacy page's theme script is allowed too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 08:45:48 +02:00
Ludovic Marie 4410c3ba44 Merge pull request #656 from LookImEcho-Rick/codex/fix-multiplayer-world-options
Fix multiplayer pause menu and World Options permissions
2026-10-17 08:39:44 +02:00
Ludovic Marie d85a16daf8 Merge main into feat/server-online-mode
lan/conn.rs imports: keep this branch's AtomicU32 and main's Mutex/PoisonError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 08:34:34 +02:00
Ludovic Marie 6b0b34098e Benchmark: Horizon's server against vanilla 26.3 on equal work
Walk and explore passes at 1 to 100 bots on the ThinkPad (bots on the Mac
mini), vanilla with the locator bar off, plus an explore pass at a rate both
servers keep up with. The README has the method, the tables, the profile of
what remains at 25 walking bots and the earlier runs; docs/server.md section
9 and the Scale row summarise it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 08:09:50 +02:00
Ludovic Marie 9665a7c5b0 Merge pull request #609 from LookImEcho-Rick/fix/563-translucent-block-outline
fix(rendering): correct selection outline on translucent blocks
2026-10-17 08:01:13 +02:00
Ludovic Marie ee104603dd horizon-port-pack: a library, fetch and port; CurseForge zips name their mods
The launcher's "Import modpack" needs the pipeline as a library and a way to
get the jars a pack names without redistributing anything.

- The steps move into the library (pipeline.rs) with a line callback, so the
  command line and the launcher run the same code; main.rs is a thin CLI.
- fetch: the jars of the portable mods (content, data tier) into
  <work>/jars/, the player's own downloads: copied from a folder they have
  (by SHA-1, or a CurseForge app instance's minecraftinstance.json), else
  from the pack's own link (.mrpack hosts only) or the same file on
  Modrinth's public CDN found by SHA-1, kept only when the hash matches.
  What only CurseForge has is listed as needing a CurseForge API key.
  <work>/fetch.json records each file.
- port: every step after the import for the portable mods (fetch, the
  inventory again with the jars read, carry, report).
- A CurseForge zip whose overrides hold Crash Assistant's modlist.json (All
  the Mods 10 does) takes its jar names, mod ids and SHA-1s instead of bare
  project ids, so Modrinth answers for most files.
- inventory goes on offline when Modrinth cannot be reached.

All the Mods 10 8.3's CurseForge zip: 496 files named; of the 54 data-tier
content mods 42 download from Modrinth's CDN (84 MB) and 12 need the key or
the player's instance; 42 carried over (partial: the harness is a dev step).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 07:00:45 +02:00
LookImEcho-Rick aeaccb0413 Fix multiplayer pause menu and World Options permissions 2026-10-16 23:39:36 -05:00
Ludovic Marie bf851bfea1 Merge pull request #648 from ludovic111/feat/modpack-bench
Content mods: refuse more block states than chunks hold; the pack against NeoForge, measured
2026-10-17 05:01:42 +02:00
Ludovic Marie 1e514f8539 Merge pull request #633 from ludovic111/feat/port-pack-report
horizon-port-pack report: coverage per mod, and ATM10 measured
2026-10-17 04:58:09 +02:00