Commit Graph

4750 Commits

Author SHA1 Message Date
Ludovic Marie fd8223061c Merge pull request #303 from ludovic111/feat/list-scrollbars
World list and pack lists: vanilla scroller, dragged with the pointer
2026-10-15 11:37:49 +02:00
rdbtCVS 0c161a0336 Cache random-tick section eligibility for unchanged chunks 2026-10-15 10:37:46 +01:00
Ludovic Marie 889fff562d Merge pull request #301 from ludovic111/feat/multiplayer-lan-scanning
Multiplayer: vanilla's server list, with the LAN scanning text and its animated dots
2026-10-15 11:37:43 +02:00
Ludovic Marie fbb458252f Merge pull request #299 from ludovic111/feat/menu-blur
Blur the panorama behind world selection, multiplayer and world creation, as vanilla does
2026-10-15 11:37:36 +02:00
Ludovic Marie b92cc7c9e8 Merge pull request #295 from ludovic111/feat/recipe-toast-icons
Recipe toasts show the workstation icon and cycle through the unlocked recipes
2026-10-15 11:37:23 +02:00
Ludovic Marie 61a127a2a2 Fishing: the rod casts, bites splash and bubble, and the line is vanilla's
- The fishing rod switches to its cast model while its hook is out
  (FishingRodCast), in first person, third person and the hotbar.
- FishingHook.catchingFish's particles: splashes where fish tease the bait,
  the fishing-particle trail and bubbles of a fish swimming up, and the
  bubble and fishing burst when it bites.
- FishingHookRenderer: the line is 16 black `lines` segments of the window's
  line width (2.5 px at 1080p) from a quarter block above the hook to the
  rod hand (on the near plane in first person, beside the body in third),
  and the bobber is centred on the hook.

Fixes #265

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:35:31 +02:00
Ludovic Marie adb19abd4c Minecarts roll, rattle when ridden, and take hits with the attack sounds
MinecartSoundInstance follows every minecart in the level (entity.minecart.riding,
louder with speed, silent when the tick rate is frozen), and getting in one starts
RidingMinecartSoundInstance's two inside sounds (normal and underwater). Hitting a
minecart or a boat plays Player.attack's strong/weak (and knockback) sounds.

The sound_engine harness now replays both instances against the vanilla client.

Fixes #227

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:29:15 +02:00
Ludovic Marie 4abf648a85 Merge pull request #280 from ludovic111/fix/streaming-reload-loop
Stop reloading saved columns every frame after the player moves
2026-10-15 11:27:01 +02:00
Ludovic Marie 5d17c56d77 Merge pull request #269 from ludovic111/perf/worker-face-visibility
Load worlds ~4.7x faster: stop copying the face visibility table per mesh job
2026-10-15 11:26:54 +02:00
Ludovic Marie 9044c69429 Merge pull request #307 from ludovic111/feat/bee-hives
Bees live in hives and nests: they go home, come out in the morning and make honey (#208)
2026-10-15 11:18:21 +02:00
Ludovic Marie 68ec2236e2 Merge pull request #293 from ludovic111/fix/drowned-parity
mob_ai oracle: wait for the light engine before ticking (drowned flake, #290)
2026-10-15 11:13:48 +02:00
Ludovic Marie 5876014b57 Droppers and hoppers don't take a beehive for a container
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:36:37 +02:00
Ludovic Marie 1f4154c0df F3+4 shows the lightmap texture in the bottom right corner
DebugScreenOverlay.toggleLightmapTexture and showLightmapTexture: the 16x16
lightmap at 64x64 on a black border, 2 pixels from the corner, sky light up
and block light right, as vanilla's flipped blit. It shares the bottom of the
screen with the F3+2 and F3+3 charts, so each switch turns the others off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:31:14 +02:00
Ludovic Marie dc863a66a4 Create New World: vanilla's Game, World and More tabs
CreateWorldScreen as in 26.3: a MenuTabBar (tab sprites, header
separators, underline) over the transparent tab header, each tab's
GridLayout aligned at (0.5, 1/6) between it and a 33-pixel footer with
Create New World and Cancel.

Game: the world name box with its save-folder tooltip, Game Mode
(Survival, Hardcore, Creative), Difficulty and Allow Commands, locked
in Hardcore. World: World Type (Default, Superflat), Customize, the seed
box with its hint, and the Generate Structures / Bonus Chest switches.
More: Game Rules, Experiments and Data Packs. Tooltips follow vanilla's.

The choices reach the new world: hardcore, difficulty and allowCommands
in level.dat, and world_gen_settings with the flat preset, structures and
bonus chest written before streaming starts. Re-Create reads them back.

Fixes #281

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:24:52 +02:00
Ludovic Marie 6ae018055d Debug charts: F3+2 frame and tick times, F3+3 ping and bandwidth
DebugScreenOverlay's FpsDebugChart, TpsDebugChart, PingDebugChart and
BandwidthDebugChart with vanilla's scales, colours and places: 240 samples
(LocalSampleLogger), F3+2 and F3+3 toggles that show the overlay and exclude
each other, the overlay's "Debug charts" lines, and the play-state ping
request and pong response packets the ping chart uses on servers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:16:02 +02:00
Ludovic Marie df0acb2810 Merge pull request #302 from ludovic111/ci/parity-timeout
CI parity: allow 120 minutes so core changes finish instead of timing out
2026-10-15 10:05:43 +02:00
Ludovic Marie a8bd497132 World list and pack lists: vanilla scroller, dragged with the pointer
SelectWorldScreen's list now sits at vanilla's 49..h-60 with the list
background, header and footer separators, white selection outline and
the widget/scroller sprites at the row's right + 8. The scroller follows
the pointer while held (AbstractScrollArea.mouseDragged), the wheel moves
half a row, and the pack screen's lists can be dragged the same way.

Part of #282

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:04:37 +02:00
Ludovic Marie f2e87721f4 CI parity: allow 120 minutes, so changes to core crates finish instead of timing out
Changes to horizon-core or horizon-world make ~280-300 harnesses rerun, which takes
60-90 min on the Mac mini runners; at 45 min those runs were cancelled and proved nothing
(#269, #280, #292 today).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:59:10 +02:00
Ludovic Marie 3ed8abd25e Merge pull request #300 from ludovic111/fix/autosave-spike
Autosave stops waiting for entity writes: no more 2 s freeze (#224)
2026-10-15 09:58:50 +02:00
Ludovic Marie c0e1095ea9 Merge pull request #294 from ludovic111/fix/arrow-interpolation
Arrows stop jumping along their path after they land (#278)
2026-10-15 09:58:46 +02:00
Ludovic Marie 9593d9e329 Merge pull request #292 from ludovic111/fix/golem-persistence
Copper golems keep the persistence vanilla saved (#289)
2026-10-15 09:58:42 +02:00
Ludovic Marie 587695e108 Multiplayer: vanilla's server list, with the LAN scanning header and its dots (#282)
JoinMultiplayerScreen's layout: the title centred in the 33-pixel header, the
ServerSelectionList between the separators (list background, 305-wide rows,
white selection outline, scissored rows, the scroller sprites), the footer
buttons centred in 60 pixels. The list always ends with the LAN header,
"Scanning for games on your local network" over LoadingDotsText's dots,
then the LAN games. Saved servers show two MOTD lines, the player count and
the ping, pinging or unreachable icon; Edit and Delete need a saved server.
The list scrolls with the wheel and a draggable scrollbar (ui::Scroll, after
AbstractScrollArea).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:48:14 +02:00
Ludovic Marie b18261cc79 Autosave doesn't wait for the entity writes
The autosave queued its chunks without waiting (#284), then saved the
entities with the waiting call. The region writer is one FIFO thread,
so the main thread still waited for every chunk queued before the
entities: a 1.9 s frame at the 5-minute autosave on a world with ~900
columns. Like PersistentEntitySectionManager.autoSave (saveAll's flush
only on save-all and quit), the autosave now queues the entities too.

Part of #224

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:39:04 +02:00
Ludovic Marie 6953710c74 Blur the panorama behind the title menus' screens, as vanilla does (#282)
Screen.extractBlurredBackground: every classic screen reached from the title
(world selection and creation, multiplayer, options) blurs the panorama with
vanilla's minecraft:blur post chain, three horizontal and vertical box blur
passes of menuBackgroundBlurriness pixels, then draws menu_background over it
instead of a flat dark fill. The title screen itself stays sharp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:32:16 +02:00
Ludovic Marie 02cfbf6f28 Merge pull request #298 from ludovic111/fix/firework-entity-light
Draw flying firework rockets as their lit item model like vanilla
2026-10-15 09:31:33 +02:00
Ludovic Marie eb1467f45f Merge pull request #297 from ludovic111/fix/leaves-option-remesh
Rebuild every section when See-Through Leaves, Smooth Lighting or Biome Blend changes
2026-10-15 09:30:39 +02:00
Ludovic Marie bab7cf92a7 Merge pull request #296 from ludovic111/fix/reversed-z-depth
Render the world with reversed depth like vanilla (far fire no longer flickers)
2026-10-15 09:30:02 +02:00
Ludovic Marie cf67db1873 Render firework rockets as their lit item model like vanilla
FireworkEntityRenderer submits the rocket's item in the GROUND context,
turned to the camera (and over on its side when shot at an angle), at the
packed light of its eye. Horizon drew a flat 0.5-block sprite at full
brightness, so rockets glowed at night and had no item shading.

Fixes #279

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:24:19 +02:00
Ludovic Marie 81b07d1dd9 Rebuild every section when a meshing option changes like vanilla
Options.cutoutLeaves, ambientOcclusion and biomeBlendRadius call
LevelExtractor.allChanged when they change. Horizon only handed the new
value to the mesher, so after turning See-Through Leaves off the loaded
sections kept their see-through leaves, pale against the sky, beside the
opaque ones of sections rebuilt later.

Fixes #273

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:24:19 +02:00
Ludovic Marie 1bfef88477 Render the world with reversed depth like vanilla
Vanilla 26.3's Projection passes its planes reversed and every pipeline
tests GREATER_THAN_OR_EQUAL. Horizon kept forward depth with a 0.05 near
plane, so far geometry lost precision and fire_side's quad, 0.01 pixel in
front of the block it burns on, z-fought with it.

Fixes #272

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:24:19 +02:00
Ludovic Marie 111b237b6d Bees live in hives and nests: they go home, come out in the morning and make honey (#208)
BeehiveBlockEntity (crate::beehive): up to three bees stored as entity
tags, out when their time is up (not at night, in the rain or through a
blocked front unless in an emergency), honey for nectar, the flower they
knew; vanilla's bees / flower_pos save format. Bees find a hive with room
(BeeLocateHiveGoal), fly home and go in (BeeEnterHiveGoal through
MobEvent::EnterHive). In the game hives tick, breaking one lets the bees
out angry unless smoked, fire empties it, dispensers release them.

mob_ai: bee_hive_night, _rain, _morning and _honey match vanilla.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:14:21 +02:00
Ludovic Marie 5530d682ab Arrows interpolate from their last tick, not from where they were shot
arrows::tick never set the projectile's previous position (Entity.setOldPosAndRot
at the start of every tick); Projectile::tick does, but arrows don't go
through it. The renderer lerped from the spawn point to the current
position every frame, so a flying or stuck arrow jumped along its whole
path. The arrow harness now prints the old position too.

Fixes #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:03:39 +02:00
Ludovic Marie f88bfc66f8 Recipe toasts show the crafting station and cycle through every unlocked recipe (#283)
RecipeToast keeps the station and result of each display unlocked while it
is up, draws the station at 0.6 scale in the plaque's corner over the result,
takes turns through them over the display time and stays up five more seconds
after each unlock. Toasts slide in and out on ToastInstance's squared curve,
honour notificationDisplayTime and play ui.toast.in / ui.toast.out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:55:36 +02:00
Ludovic Marie fa188fca42 mob_ai oracle: wait for the scene's light updates before ticking (#290)
The oracle started a scenario once hasLightWork() had been false for six
ticks, but light updates reach the light thread through the chunk task
dispatcher, where hasLightWork() can't see them. A drowned's first
sun-burn roll (Mob.isSunBurnTick draws only when the brightness at its
eyes is above 0.5) then read the dirt's light under a freshly filled
pool or the water's, depending on thread timing: one random draw more or
less, and drowned_pool / drowned_pool_swimmer failed at random.

Queue ThreadedLevelLightEngine.waitForPendingTasks on every forced chunk
after building the scene and tick only once they have all completed.

Fixes #290

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:34:05 +02:00
Ludovic Marie b5a2afb71e Merge pull request #291 from ludovic111/feat/bee-flight
Bees fly, pollinate flowers, get angry and sting
2026-10-15 08:19:07 +02:00
Ludovic Marie 77cad63374 Merge pull request #287 from ludovic111/fix/bat-flight
Bats hang upside down and fly, with their wing animations
2026-10-15 08:12:08 +02:00
Ludovic Marie 271a26515a Merge pull request #285 from ludovic111/fix/strider-lava
Striders stand on lava instead of bobbing in it
2026-10-15 08:08:58 +02:00
Ludovic Marie 7c2a31206c Bees fly, pollinate flowers, get angry and sting (#208)
A port of vanilla 26.3 Bee: FlyingMoveControl and flying navigation,
hover wandering, flower search and pollination (nectar), growing crops,
tempting and breeding, persistent anger with the hurt-by alert, the sting
(poison, stinger lost, later death), drowning, staying home at night and
in rain, roll, textures and NBT. Hives as homes are not simulated yet.

FlyingMoveControl clamps the pitch like Entity.setXRot, so a rotlerp
that wraps to 359 gives 90 as in vanilla.

Mob AI parity: 9 bee scenarios, 3609/3609 ticks; full harness 120/120.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:57:51 +02:00
Ludovic Marie 2bcb30b375 Bats hang upside down and fly, with their wing animations (#215)
Bats fell into the generic fallback AI and walked like land animals; their
animation states were never started. Port vanilla Bat: hanging from a solid
block until a player comes within 4 blocks or the block goes, the take-off
level event, customServerAiStep's flight towards random nearby air, Bat.tick
(held to the ceiling while resting, vertical speed scaled by 0.6 in flight),
setupAnimationStates (flying and resting keyframes), waking when hurt,
BatFlags in the save, no fall damage, movement events without sounds, the
lower voice pitch, and no omnidirectional air drag (vanilla gives that only
to bees, parrots and sulfur cubes).

Mob AI parity harness: six bat scenarios, 6/6 match (1906/1906 mob-ticks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:57:51 +02:00
Ludovic Marie 8cd97334bf Striders stand on lava instead of bobbing in it (#256)
Striders fell into the generic fallback AI, whose FloatGoal jumped them
up and down in lava. Port vanilla Strider: its goals (no FloatGoal,
StriderGoToLavaGoal, RandomStrollGoal every 60 ticks, LookAtPlayerGoal for
striders), floatStrider, standing on lava sources through the living
collision context and the half-block liquid shape, travelling in air where
lava holds it up, StriderPathNavigation's lava destinations, the walk target
value, going cold (suffocating speed modifier, cold texture) away from warm
blocks, the happy/retreat sounds and a lava-proof checkFallDamage.

Mobs now keep Entity.mainSupportingBlockPos from their last move, as
getBlockStateOnLegacy reads it.

Mob AI parity harness: five strider scenarios, 5/5 match (1105/1105
mob-ticks; 0/5 and 5/1105 before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:57:51 +02:00
Ludovic Marie fb15822b3b Load PersistenceRequired as vanilla does: copper golems save 0 again
Mob.readAdditionalSaveData assigns persistenceRequired from the tag,
overriding the constructor's setPersistenceRequired (copper golems,
elder guardians). Horizon ORed it in, so a copper golem vanilla saved
with 0 came back with 1. The monument's elder guardian, which Horizon
builds from NBT where vanilla calls the constructor, now carries the
flag in its spawn NBT.

Fixes #289

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:41:31 +02:00
Ludovic Marie e626a727a1 Merge pull request #267 from ludovic111/feat/perf-mesh-once
Mesh each column once its neighbours' light has settled
2026-10-15 07:35:44 +02:00
Ludovic Marie 6dde5ec2d0 Merge pull request #288 from ludovic111/fix/save-roundtrip-macos
Run the save round-trip harness on macOS without vscreen
2026-10-15 07:26:54 +02:00
Ludovic Marie 282acfe086 Merge pull request #254 from ludovic111/feat/perf-battery-mode
Battery mode: an opt-in 60 FPS cap (30 in menus or unfocused) and half the worker threads
2026-10-15 07:23:31 +02:00
Ludovic Marie 0f569a4918 Merge pull request #261 from ludovic111/feat/launcher-perf
Launcher measurements: a session performance log and horizon-launcher benchmark
2026-10-15 07:20:59 +02:00
Ludovic Marie a6860bbec6 Merge pull request #263 from ludovic111/feat/benchmark-mode
horizon-client --benchmark SCENARIO: benchmark your own machine, report in the shared format
2026-10-15 07:20:54 +02:00
Ludovic Marie 18234d3a01 Merge pull request #264 from ludovic111/feat/perf-bench-report-v1
perf_bench.py: repeats with 95% CIs, the shared report format, loads end when meshing is done
2026-10-15 07:20:42 +02:00
Ludovic Marie 7b6ef36d90 Merge pull request #247 from ludovic111/feat/bench-report
Benchmark report format v1 (docs/benchmark-report.md, crates/horizon-bench)
2026-10-15 07:20:04 +02:00
Ludovic Marie 0c685d9db4 Stop reloading saved columns every frame after the player moves
Generation asked for columns within the view distance + 3 or two of a
finished chunk, but a column that came back finished (loaded from the
save) was kept only within + 2 or one of a finished chunk. After a
teleport, saved columns in between were loaded, dropped, asked for and
loaded again on every frame, forever: 8 of them at render distance 16
held 8 of the 39 in-flight generation slots and kept the disk and a
worker busy. The requested, kept and unloaded ranges now live in Ranges
and nest; requested_columns_stay_loaded checks it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 07:14:31 +02:00
Ludovic Marie 375a685b84 Merge pull request #230 from rdbtCVS/perf/generation-scan-invalidation-20261014
perf(streaming): skip unchanged generation scans
2026-10-15 07:11:36 +02:00