Commit Graph

2172 Commits

Author SHA1 Message Date
Ludovic Marie c32c00aeb2 Merge pull request #701 from ludovic111/perf/advancements-flush-idle
Server: skip the advancement flush for players whose progress didn't change
2026-10-17 16:30:57 +02:00
Ludovic Marie 1fc1b75007 Merge pull request #699 from ludovic111/ci/launcher-release-paths
Launcher releases: count every crate the launcher builds in
2026-10-17 15:32:58 +02:00
Ludovic Marie f90f33b6a9 Merge pull request #698 from ludovic111/launcher-win-fix
Launcher: Windows tests pass again (releases blocked since launcher-v0.4.0)
2026-10-17 15:02:37 +02:00
Ludovic Marie f49af8d995 Launcher releases: count every crate the launcher builds in
LAUNCHER_PATHS and launcher.yml's push paths now list horizon-bench,
horizon-friends, horizon-mods and horizon-port-pack too, the launcher's
path packages per cargo metadata. A change there (like the horizon-mods
dependency that left launcher/Cargo.lock stale) then builds and releases
the launcher instead of going unnoticed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:59:01 +02:00
Ludovic Marie 002f14ce53 Merge pull request #692 from ludovic111/feat/locator-bar
Locator bar for vanilla clients on Horizon servers (waypoint packets as vanilla sends them)
2026-10-17 14:56:09 +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 851d34f762 Merge pull request #589 from ludovic111/feat/server-online-profiles
Online mode: players named in commands are their accounts
2026-10-17 14:56:01 +02:00
Ludovic Marie bff5891073 Launcher: Cargo.lock has horizon-port-pack's horizon-mods dependency
horizon-port-pack now depends on horizon-mods (1f1d5a5a), which the
launcher's own lock file didn't have, so every --locked build of the launcher
failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:46:16 +02:00
Ludovic Marie 05821d4e62 Launcher: Windows tests check behaviour, not symlink paths
On Windows the launcher links another launcher's client jar with a hard link
(a copy across volumes) and its libraries and assets with a junction, since
symlinks need developer mode. canonicalize() of a hard link is its own path,
so the sources tests, which compared canonical paths, failed on Windows and
blocked every launcher release since launcher-v0.4.0. They now check that the
linked jar is the launcher's file (a byte written through one shows in the
other), which holds for a symlink and a hard link alike.

The modpack profile test compares paths as paths rather than strings ending
in "a/carry".

mklink /J's paths are always quoted: Rust only quotes arguments with spaces,
and cmd reads an unquoted & or ^ in a user folder as its own syntax.

CI runs every launcher test target, not just the library's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:45:52 +02:00
Ludovic Marie 799ec775e1 Merge pull request #679 from Online5277/fix/sleeping-player-state
Fix sleeping input, camera height and wake fade
2026-10-17 14:34:56 +02:00
Ludovic Marie 995bd56cdf Merge pull request #691 from ludovic111/fix/trident-throw-pose
Trident throw pose in third person
2026-10-17 14:19:07 +02:00
Ludovic Marie 3e31144362 Merge pull request #690 from ludovic111/fix/mob-float
Mobs float in water instead of bouncing
2026-10-17 14:19:03 +02:00
Ludovic Marie 6d40915b63 Merge pull request #689 from ludovic111/fix/swim-pose
Swimming pose and stroke on the player model
2026-10-17 14:18:58 +02:00
Ludovic Marie 78e3206133 Merge pull request #673 from Online5277/fix/render-distance-settings-cap
Allow render distances up to 64 chunks in settings
2026-10-17 14:13:30 +02:00
Ludovic Marie 6026893e88 Merge pull request #686 from ludovic111/perf/sprite-blend-round
Blend animated sprite frames without a roundf call per byte on x86
2026-10-17 14:13:06 +02:00
Ludovic Marie a1c20290ae Merge pull request #688 from ludovic111/fix/rd32-gpu-oom
Keep terrain in system memory when video memory is full instead of crashing (#600)
2026-10-17 14:13:01 +02:00
Ludovic Marie 980ce75d63 Merge pull request #676 from Online5277/fix/reclaim-terrain-gpu-memory
Release unused terrain GPU buffers
2026-10-17 14:12:57 +02:00
Ludovic Marie 7fb54b8150 Merge pull request #661 from ludovic111/perf/entity-portal-precheck
Entity portal checks: skip the sweep where no section holds a portal
2026-10-17 13:33:19 +02:00
Ludovic Marie c98a4f7a58 Server advancements: flushDirty skips players whose progress didn't change
PlayerAdvancements.flushDirty only works when it is the first packet or
progress changed. Horizon walked the whole advancement tree for every
network player every tick to find nothing new: a fifth of the server
tick with 50 players.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 12:56:29 +02:00
Ludovic Marie fa2536c120 Merge pull request #623 from ludovic111/perf/server-chunk-encoding
Dedicated server: encode each chunk section once, not once per player
2026-10-17 12:43:29 +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 87e500fa8b Merge pull request #663 from ludovic111/feat/launcher-import-modpack
Launcher: Import modpack, its coverage report, port and play it as a profile
2026-10-17 12:39:16 +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 4b76566863 Merge pull request #685 from ludovic111/fix/latency-update-cadence
Server: send tab-list latency every 601 ticks, as vanilla
2026-10-17 12:28:13 +02:00
Ludovic Marie 15b26795e6 Blend animated sprite frames without a roundf call per byte on x86
Interpolated animated sprites (`"interpolate": true`) mix two frames into
every mip level with `f32::round`. Baseline x86-64 has no rounding
instruction (it needs SSE4.1), so each byte was a call into libm's roundf:
7.8 to 8.5% of the render thread's samples on a Kaby Lake laptop.

Round with a truncation and an exact fraction test instead. The result
is bit-identical to `f32::round` for every value the blend can produce,
checked over all frame byte pairs at 144 blend times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:52:45 +02:00
Ludovic Marie c3e5a20488 Dedicated/LAN server: send tab-list latency every 601 ticks, as vanilla
PlayerList.tick broadcasts UPDATE_LATENCY once ++sendAllPlayerInfoIn > 600;
the hub sent it every 100 ticks. The extra updates landed in the
dedicated_server harness's respawn window and failed it at random.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:51:51 +02:00
Ludovic Marie 98dc7b17b7 Merge pull request #608 from rdbtCVS/perf/versioned-behaviours-cache
Cache resolved block behaviours in versioned binary snapshots
2026-10-17 11:33:47 +02:00
Ludovic Marie cf00d588c2 Merge pull request #660 from ludovic111/perf/pathfinder-caches
Pathfinder: Fx-hashed nodes, and each path type worked out once per query
2026-10-17 11:33:06 +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 c2a82d4618 Merge pull request #658 from ludovic111/fix/sculk-scan-palette
Sculk: find a loaded chunk's sensors from its palettes, not every block (#489)
2026-10-17 11:33:01 +02:00
Ludovic Marie af0cfa9d3f Merge pull request #657 from ludovic111/fix/structure-starts-on-load
Build a saved chunk's structure starts when it loads, not on the game thread (#489)
2026-10-17 11:32:55 +02:00
Ludovic Marie 22bb18d67a Carry: the oracle's facts only for the mods it loaded
With oracle/facts.json, a mod the oracle did not load (a library it
needs is missing) lost every block: none of its ids were in the facts.
It now keeps the guesses from its blockstates, as without an oracle.
ATM10: Regions Unexplored (TerraBlender is CurseForge-only) gets its
805 blocks back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 11:24:31 +02:00
Ludovic Marie 814b70b8c2 Keep terrain in system memory when video memory is full instead of crashing (#600)
At render distance 32 the section arena holds about 1.5 GB of vertices
(2.1 GB of GPU memory in all while flying). Vulkan drivers fail an
allocation once video memory is full instead of paging like OpenGL
drivers, and wgpu's default error handler turns that into a panic: a
4 GB laptop GPU that also drives the desktop crashed a few seconds into
an RD32 world.

Arena pages are now created inside an out-of-memory error scope. A page
that doesn't fit in video memory is created mappable, which the
allocator places in host-visible system memory, so the terrain still
draws (more slowly) as OpenGL drivers do. A page that can't grow keeps
its contents and a smaller new page is tried; with no memory left at
all, the section is skipped rather than the game ending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:56:26 +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 3d21289df7 Merge main into perf/server-chunk-encoding
lan/chunks.rs: keep the per-section encode cache and the cached
heightmaps, applied to the level's section range from #668. Heightmaps
use client_heightmaps_in with the level's min_y and height, and
set_dimension drops cached heightmaps. The light layers go over the
level's sections and drop sky light where the level has none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:44:07 +02:00
Cosmic 394bc68702 Merge remote-tracking branch 'origin/main' into fix/sleeping-player-state 2026-10-17 04:41:31 -04:00
Cosmic 516661592f Keep sleeping input camera and HUD in bed state 2026-10-17 04:41:31 -04:00
Ludovic Marie 1af78463eb Merge pull request #677 from Online5277/fix/sweep-attack-particles
Show sweep particles on charged sword hits
2026-10-17 10:36:11 +02:00
Ludovic Marie d5837931aa Merge pull request #675 from Online5277/fix/respawn-after-save
Use the configured respawn point after saving
2026-10-17 10:32:35 +02:00
Ludovic Marie fda706d17f Merge pull request #668 from ludovic111/feat/server-dimensions
Server: the level follows its lone player through Nether and End portals
2026-10-17 10:31:04 +02:00
Ludovic Marie 51db0894bf Merge pull request #662 from ludovic111/feat/network-player-progress
Network players keep advancements, statistics and a recipe book on the server
2026-10-17 10:31:01 +02:00
Ludovic Marie 5b922172ac Merge pull request #664 from ludovic111/feat/client-advancements
Network client: show the server's advancements and statistics
2026-10-17 10:30:57 +02:00
Ludovic Marie 46c7daad92 Merge pull request #655 from ludovic111/fix/client-server-packets
Network client: apply block entity data, difficulty, spawn, chunk centre, tick rate and animations from the server
2026-10-17 10:30:53 +02:00
Cosmic 74860c0312 Emit sweep particles for eligible sword hits 2026-10-17 04:28:04 -04:00
Ludovic Marie 171fbeb8ac Send vanilla clients the locator bar on dedicated and LAN servers
Port 26.3's ServerWaypointManager for the players of a served world: each
player who receives waypoints gets ClientboundTrackedWaypointPacket for
every other player who transmits one, as a block (in view), a chunk (one
chunk out) or an azimuth (really far), with the update thresholds,
breaking rules and team colours vanilla uses. Crouching, invisibility and
a carved pumpkin or mob head hide a player; spectators see everyone and
are seen by no one; the locator_bar game rule turns it all off and on.

tools/test_locator_bar_parity.py runs vanilla's server and Horizon's with
two vanilla-codec players and compares every waypoint packet each receives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:14:34 +02:00
Cosmic b47f565849 Reclaim unused terrain GPU arena pages 2026-10-17 04:04:25 -04:00
Ludovic Marie 69a0d13eda Raise the trident over the shoulder while charging a throw
AvatarRenderer.getArmPose gives THROW_TRIDENT to the hand using a
trident: HumanoidModel lifts that arm over the head (xRot * 0.5 - pi)
and leaves the other arm's pose alone (affectsOffhandPose). Horizon
used the plain item pose, so the held trident, drawn with its throwing
model, pointed down through the body. An aggressive drowned raises its
trident the same way (DrownedRenderer), and zombie arms leave that arm
alone (AnimationUtils.animateZombieArms).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 09:45:18 +02:00
Ludovic Marie 62f96e9d65 Mobs float in water instead of bouncing
FloatGoal's constructor lets the navigation float, so Mob.jumpInLiquid
adds 0.04F a tick; Horizon set that flag only for a few species, and
every other FloatGoal user (pigs, cows, wolves, cats, horses, witches,
illagers...) got the non-floater 0.3 and bounced out of the water.
Register it from the goal (and from the constructors that set it:
allay, armadillo, camel, goat, parrot, wither), and add 0.04 as the
float vanilla adds.

Mobs that drop back into water now splash (Entity.doWaterSplashEffect
from updateFluidInteraction, skipped on the first tick), with their
swim splash sound. The new mob_ai deep_water scenarios also caught:
horses register addBehaviourGoals last (none for the skeleton horse, no
mount panic for the zombie horse), RandomStandGoal waits the horse
ambient interval (400 for every AbstractHorse), and the cat's sit-on-
block goal draws its delay only for tame cats once the last ran out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 09:42:46 +02:00
Cosmic e87e5f0cd2 Discard saved login position when respawning after death 2026-10-17 03:41:55 -04:00
Ludovic Marie 5d027877ec Merge pull request #672 from Online5277/fix/audio-output-limiter
Avoid hard clipping when explosion sounds overlap
2026-10-17 09:32:44 +02:00