#656 handles ClientboundChangeDifficultyPacket and refreshes the World
Options screen too; this branch's own arm became unreachable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With single player on its server thread, the window is the server's client
and dropped several packets the in-frame game never needed:
- ClientboundBlockEntityDataPacket and the block entities of chunk packets:
the block entity of that type loads the tag (signs, spawners), as
handleBlockEntityData and LevelChunk.replaceWithPacketData do.
- ClientboundChangeDifficultyPacket: the level data's difficulty and lock.
- ClientboundSetDefaultSpawnPositionPacket: the respawn data spawn
compasses point at.
- ClientboundSetChunkCacheCenterPacket: ClientChunkCache's view centre;
columns outside the storage (the server's radius + 3) are ignored or
dropped, as ClientChunkCache.Storage does.
- ClientboundAnimatePacket: wake up, and the critical and magic critical
hit emitters.
- ClientboundTickingStatePacket / ClientboundTickingStepPacket (new in the
protocol crate): the level's TickRateManager. A frozen level holds its
time and non-player entities, and the server's rate only ever slows the
client timer down (Minecraft.getTickTargetMillis).
- ClientboundServerDataPacket: the server list entry keeps a valid icon
(ServerList.saveSingleServer); single player has no entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lan_actions.rs: clear the old body's potions (main), then respawn with
the tick context (this branch). hub.rs: keep main's effect and chunk
tracking reset before this branch's vanilla respawn sequence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every PR of the startup batch adds a different tools/profile_client_startup.py,
so any two of them conflict. This one becomes tools/profile_shared_json.py; its
guide and tools/profile_gameplay_decode.py follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Loading the eight carried-over mods in the game (not only the probe) showed
two limits real packs reach. Block textures past 2048 layers are another PR;
this one handles block states and measures a pack.
- Chunk sections store a block state in 16 bits. Vanilla 26.3 has 35,723
states; Macaw's four mods add 36,154, the eight 41,389. Past 65,536 ids
wrapped onto other blocks (a trapdoor became a hanging sign).
mod_content::build now refuses a set of mods past MAX_STATES and names the
states per mod; the game then starts without content mods, as for any
refused content.
- tools/mod_port_harness.py probes each mod on its own against vanilla, as a
player adding it would load it.
- tools/perf_bench.py --game neoforge: Minecraft 1.21.1 on NeoForge 21.1.259
with --mod-jars and --deps, driven by a dev-only NeoForge port of the bench
mod (mods/horizon/src/neoforge-bench); --port-work loads a work folder's
carried-over mods into Horizon. tools/neoforge_oracle.py installs the
client once under .local/neoforge-oracle (the installer, then the vanilla
libraries it inherits, sha1-checked) and builds the driver. A NeoForge
start that crashes before the driver loads (FML reading fml.toml while
creating it) is retried once.
Measured (docs/modpacks.md): six ported mods in Horizon against the same
mods on NeoForge, Mac mini M4 Pro, 2 games per row on a loaded machine. The
world is ready 3.1x sooner at 8 and 16 chunks, the flights run 1.7x and
3.6x the frames, and Horizon's RSS is not lower (+1.1 GB with the mods).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every packet sent to a guest woke its writer thread, and at 25 walking bots
those wake-ups (mpsc notify, semaphore_signal) were about a quarter of the
server thread's tick. While tick_lan runs, packets for each guest are held
and handed over in one Out::Packets at the end; a send outside a tick, or a
disconnect, first hands over what is held, so the bytes and their order are
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
options_ui.rs: #585 put Mods... in the telemetry slot; keep it and put
Horizon Extras... in the credits slot as this branch intended.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>