Commit Graph

1521 Commits

Author SHA1 Message Date
Ludovic Marie c2f2e15643 Merge main into perf/sp-open-to-lan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 03:51:10 +02:00
Ludovic Marie 1d79cf69e1 Merge pull request #602 from ludovic111/perf/vanilla-view-distance
Draw the columns vanilla draws (ChunkTrackingView.isInViewDistance)
2026-10-17 03:48:27 +02:00
Ludovic Marie 604d83ddcd Merge pull request #596 from ludovic111/perf/sp-server-effects
Network players have status effects
2026-10-17 03:48:19 +02:00
Ludovic Marie 2ea6689f46 Merge pull request #570 from ludovic111/perf/sp-pause-labels
Integrated server: single-player pause menu labels
2026-10-17 03:48:15 +02:00
Ludovic Marie c2c7d7f4bb Merge pull request #569 from ludovic111/perf/sp-server-fonts-atlas
Integrated server: build only the font, not the whole HUD atlas
2026-10-17 03:48:11 +02:00
Ludovic Marie bbed107a6a Merge main into perf/sp-open-to-lan
integrated.rs: keep both the LAN port flag and #594's smoothed tick time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 03:41:08 +02:00
Ludovic Marie ac87384749 Merge pull request #594 from Online5277/fix/debug-packet-rates
Show live packet rates and server brands in F3
2026-10-17 03:31:54 +02:00
Cosmic 1fc3f6724e Cancel block mining immediately when opening screens 2026-10-16 19:59:23 -04:00
Ludovic Marie 2b1cd3e96e Name the launcher's real button in the incomplete-resources error
The launcher offers "Prepare again", not a Repair action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 01:42:02 +02:00
Cosmic a024409a1a Show live connection packet rates and server brands in F3 2026-10-16 19:41:02 -04:00
Ludovic Marie 64a4c72ebd Merge pull request #574 from Online5277/fix/direct-connect-address
Remember Direct Connection server addresses
2026-10-17 01:37:47 +02:00
Ludovic Marie 69d03e546a Merge pull request #575 from Online5277/fix/quit-button-sound
Preserve quit button sounds when leaving a world
2026-10-17 01:37:43 +02:00
Ludovic Marie dc42425c01 Integrated server: Open to LAN
Single player on its server thread could not be opened to the LAN: the
window is a client of that server, and Open to LAN, /publish and
`horizon-ctl lan` tried to start a second hub on the window's side.

The server thread now publishes itself, as IntegratedServer.publishServer
does:

- The window asks its server with `Integrated::call` (executeBlocking):
  a task run between two ticks, while paused too, with its answer.
- Publishing binds the port at once (a busy port fails right away), then
  the hub starts listening and announcing the world (LanServerPinger)
  with the MOTD "<owner> - <world>". Until then only the owner may log
  in; afterwards anyone may, and status pings are answered.
- Unpublishing stops the listener and sends every player but the owner
  away (multiplayer.disconnect.server_shutdown).
- /publish and /unpublish run on the server for the player who types
  them, and the integrated server's command tree (with publish, without
  the dedicated-only commands) is what its players get.
- The owner's level follows Allow Commands; other players get game
  master commands only when guests may use commands and the world allows
  them (IntegratedServer.getCustomPermissionLevel). Every player's
  command runs at their own level.
- The world options screen reads and applies its settings on the
  server: difficulty, default and personal game mode, Allow Commands and
  the LAN settings; the window shows the outcome.
- A published world does not pause (Minecraft.pause needs
  !isPublished), and F3+Escape follows the same rule.
- Memory connections are never compressed, whatever the threshold
  (Connection.isMemoryConnection), so network players get the usual 256.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 01:33:34 +02:00
Cosmic d652b25ead Package registry reports and recover from incomplete server resources 2026-10-16 19:12:40 -04:00
Cosmic 43d5ed8246 Play menu button clicks after world teardown 2026-10-16 18:52:00 -04:00
Cosmic e6068b1246 Remember Direct Connection addresses in both menus 2026-10-16 18:51:25 -04:00
Ludovic Marie f535d1b48c Merge pull request #556 from ludovic111/feat/horizon-bots
horizon-bots and tools/server_bench.py: the first server benchmark against vanilla
2026-10-17 00:47:54 +02:00
Ludovic Marie ee3a160cbd Merge pull request #555 from ludovic111/feat/horizon-server-panel
horizon-server: the web panel
2026-10-17 00:47:51 +02:00
Ludovic Marie 652e547b53 Merge pull request #554 from ludovic111/feat/horizon-server-packaging
horizon-server: install scripts, a Docker image, and boot services
2026-10-17 00:47:47 +02:00
Ludovic Marie f3f2301dce Merge pull request #553 from ludovic111/feat/horizon-server-backups
horizon-server: backups, restore and automatic backups
2026-10-17 00:47:43 +02:00
Ludovic Marie f04562c640 Merge pull request #552 from ludovic111/feat/horizon-server-control
horizon-server: start, stop, status, cmd and logs through a local control API
2026-10-17 00:47:39 +02:00
Ludovic Marie 000fafa9bd Merge pull request #551 from ludovic111/feat/horizon-server
horizon-server: server.toml, init, and a supervisor that runs the game
2026-10-17 00:47:35 +02:00
Ludovic Marie 2e2645ba9d Fix main build: falling anvil wear reads blocks from self.pack
#528 was tested before #537 moved the asset registry from Resources to
the reloadable pack, so main stopped compiling after both merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:35:45 +02:00
Ludovic Marie b324ee7e3a Merge pull request #528 from Online5277/fix/falling-anvil-damage
Apply falling anvil impact damage and wear
2026-10-17 00:31:30 +02:00
Ludovic Marie 361c994d98 Draw the columns vanilla draws: ChunkTrackingView.isInViewDistance
Vanilla draws a section when its column is within the render distance of
the camera's column with a column of slack on each axis
(SectionOcclusionGraph.isInViewDistance → ChunkTrackingView): 533
columns at render distance 12. Horizon meshed a circle of radius 12 (441
columns) and drew sections whose centre lay within 16 x distance + 24
blocks, so the edge of the world, mostly in fog, missed columns vanilla
shows, and fell short of vanilla's corners.

`streaming::in_view_distance` is vanilla's test. Streaming meshes the
columns it accepts around the player (and forced ones), and the
renderer's column walk draws the ones it accepts around the camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:23:02 +02:00
Ludovic Marie a71d148ca5 Network players have status effects
A player who joins over the network, which is now single player's own
player on its server thread, had no status effects: what they drank, ate
or were given went to the host, and their client never heard of any.

- Each guest has their own effects. `as_guest` trades them, and what
  their body was given for them (attribute modifiers, armor protection,
  enchantment modifiers), with the host's while the guest acts.
- They tick on the server with the guest's body (LivingEntity.baseTick's
  tickEffects), spectators included.
- The client is told as vanilla's ServerPlayer does: every effect when
  placed (PlayerList.sendActivePlayerEffects), then added (blended),
  updated, refreshed every 600 ticks left, and removed. An effect that
  only counted down is not sent again.
- The client keeps its own effects from those packets
  (LivingEntity.forceAddEffect), counts them down (tickClient), and its
  predicted movement, HUD icons and night vision follow them. A respawn
  starts without effects on both sides.
- Guests save and load them in their player file.

Saving also stops writing effects that have run out: the loaded player
compound kept the old `active_effects`, and they came back on reopen.
Potions in flight now tick on a server without a local player too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:22:53 +02:00
Ludovic Marie 30d11d6a2e Integrated server: single-player pause menu labels
On its server thread a single-player world is joined like a server, so
the Horizon pause menu named it "Multiplayer" with a "Disconnect" button,
and F3+Escape opened the full menu as on a server. The server thread now
hands the window the world's name with its connection, the pause menu
shows that name and "Save and quit", and `has_singleplayer_server`
(Minecraft.hasSingleplayerServer) covers both ways of running a world for
the pause checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:12:08 +02:00
Ludovic Marie bd0dd979a0 Integrated server: build only the font, not the whole HUD atlas
The integrated server draws nothing, but it built the window's full HUD
atlas (GUI, item, block, entity and particle textures plus the run-time
slots). It now builds an atlas of the font sheets only, reads the glyph
widths from it and drops the pixels: text still measures the same (books
split their pages with it), without holding the textures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:12:08 +02:00
Ludovic Marie 19aac92bb7 Merge pull request #545 from ludovic111/perf/integrated-memory-connection
Integrated server: join through memory instead of a socket
2026-10-17 00:11:50 +02:00
Ludovic Marie 44c3ebb0d8 Merge pull request #544 from ludovic111/perf/integrated-server-thread
Run single player on an integrated server thread (opt-in)
2026-10-17 00:11:47 +02:00
Ludovic Marie 4e9495175c Merge pull request #538 from ludovic111/perf/game-constructor
Build the game in Game::new instead of inside run()
2026-10-17 00:11:42 +02:00
Ludovic Marie 9726af184b Merge pull request #537 from ludovic111/perf/resources-shared-split
Split Resources into shared read-only data and per-game pack state
2026-10-17 00:11:38 +02:00
Ludovic Marie 5dac64f770 Merge pull request #561 from ludovic111/perf/section-culling-columns
Renderer: cull sections by chunk column from a dense list (section walk 5x faster, exact)
2026-10-16 23:04:53 +02:00
Ludovic Marie 89740d39e0 Merge pull request #560 from ludovic111/perf/skip-indirect-validation
Renderer: skip wgpu's indirect-draw validation in release builds (−0.05..0.11 ms/frame of render thread at RD 32)
2026-10-16 23:04:01 +02:00
Ludovic Marie 167339c03c Renderer: cull sections by chunk column, from a dense list
The per-frame section walk iterated a SipHash map of every resident
section, then looked each visible one up twice more by key. Resident
sections now live in a dense list grouped by chunk column: one distance
and frustum test rejects a whole column (exact: a section's box lies in
its column's box and the plane test rounds monotonically), the rest are
reached by slot, and the visible list sorts on integer keys with ties
broken by section key, so the order no longer depends on hash order.
FaceGroups looks its axes up in a table instead of searching for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:54:17 +02:00
Ludovic Marie 9b2825df34 Merge pull request #517 from Online5277/fix/world-list-text-details
Correct Classic world-list search hints and text placement
2026-10-16 22:32:01 +02:00
Ludovic Marie 7a27781ab5 Merge pull request #512 from Online5277/fix/classic-graphics-duplicates
Remove duplicated settings from Classic graphics submenus
2026-10-16 22:31:55 +02:00
Ludovic Marie af15fb1a98 Merge pull request #511 from Online5277/fix/cloud-face-alpha
Preserve cloud opacity when shading faces
2026-10-16 22:31:49 +02:00
Ludovic Marie 4ff55f7a99 Merge pull request #510 from Online5277/fix/fullscreen-all-screens
Handle fullscreen shortcut across menus and text fields
2026-10-16 22:31:42 +02:00
Ludovic Marie 6b86fa9bef Merge feat/horizon-server-panel into feat/horizon-bots
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 22:30:45 +02:00
Ludovic Marie b9d4ef3194 Merge feat/horizon-server-packaging into feat/horizon-server-panel
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 22:28:38 +02:00
Ludovic Marie 949751656a Merge feat/horizon-server-backups into feat/horizon-server-packaging
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 22:28:35 +02:00
Ludovic Marie 500241cbc6 Merge feat/horizon-server-control into feat/horizon-server-backups
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 22:28:18 +02:00
Ludovic Marie 2483f90779 Merge feat/horizon-server into feat/horizon-server-control
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 22:28:06 +02:00
Ludovic Marie 07f7e3aeab Merge remote-tracking branch 'origin/main' into srv-fix
# Conflicts:
#	Cargo.toml
2026-10-16 22:27:25 +02:00
Ludovic Marie 820936b975 horizon-bots and tools/server_bench.py: the first server benchmark against vanilla
horizon-bots is a load client on horizon-protocol for any 26.3 server: offline login, configuration,
keep-alives, pings, teleports, chunk-batch acknowledgements, and movement at 20 Hz. The bots play in
creative and fly above their spawn point, so they need no world of their own and no server refuses their
moves; idle, walk, explore and mixed behaviours are deterministic from a seed.

tools/server_bench.py runs the same bots on Horizon's server (horizon-server run) and on the pinned vanilla
jar, each fresh from the same server.properties, and measures MSPT from each server's own /tick query,
RSS and CPU of the process tree, the chunks the bots receive, and the start time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:21:19 +02:00
Ludovic Marie 7f77772e15 horizon-server: the web panel
One page embedded in the binary (crates/horizon-server/panel: HTML, CSS and JS, no framework or CDN): status,
live TPS, MSPT, RAM and CPU graphs over the last 10 minutes, players with op and kick, the console, and
backups with restore, plus restart and stop.

It listens on [panel] bind, 127.0.0.1:8130 by default; a tailnet address reaches it from the owner's
devices, and any other address is refused unless allow_public is set. `horizon-server panel` prints a
one-time login link (10 minutes) that becomes an HttpOnly, SameSite=Strict session cookie. The Host header
must name the panel, every POST needs X-Horizon: 1, failed logins are rate-limited, and the page is served
with a strict Content-Security-Policy. The control API gains GET /api/v1/metrics and, with the token
only, POST /api/v1/panel/login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:18:46 +02:00
Ludovic Marie 36b3fef0ed Merge pull request #533 from ludovic111/feat/port-pack-carry
horizon-port-pack carry: a jar's data and assets as a content mod
2026-10-16 22:13:21 +02:00
Ludovic Marie e21919c114 Merge pull request #532 from ludovic111/feat/port-pack
horizon-port-pack: import a modpack and classify its mods
2026-10-16 22:13:13 +02:00
Ludovic Marie cff7a66881 Merge pull request #531 from ludovic111/feat/mod-content-game
Content mods in the game: loot, recipes, models, names and icons from mod namespaces
2026-10-16 22:13:05 +02:00