Commit Graph

4750 Commits

Author SHA1 Message Date
Ludovic Marie 8af8d90943 Re-audit Java parity at 71% and list the next steps
214 of 215 differential harnesses pass and the client joins a vanilla
26.3 server; scores and gaps follow the merged parity work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:00:07 +02:00
Ludovic Marie 13c539df46 Add /effect and /enchant
EffectCommands (give with seconds/infinite, amplifier, hideParticles;
clear all or one) and EnchantCommand with vanilla's level, support and
compatibility checks and response messages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:52:39 +02:00
Ludovic Marie 995835c2d0 Restore the feature placement oracle the feature harnesses use
The block placement oracle had replaced VanillaPlacementOracle, which a
dozen feature harnesses call reflectively (context(JsonObject)). It now
lives in VanillaBlockPlacementOracle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:45:48 +02:00
Ludovic Marie e54b9a9deb Add situational music and ambient sounds
MusicManager: menu, game, creative, underwater, biome and End tracks from
the background_music and music_volume environment attributes, with
vanilla's delays, replacement and fades; tracks decode on a worker and
play on a dedicated mixer voice. Ambient handlers: biome loops with
40-tick cross-fades, additions, cave mood from sampled light, and the
underwater loop, additions and enter/exit sounds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:44:08 +02:00
Ludovic Marie 9edcbc2559 Give parity harness javac runs the oracle source path
Oracles reference shared helper oracles (heightmap, level shape...) that
javac could not find when only the entry files were listed. Also let
chunkgen_bench list unsupported features (HORIZON_LIST_UNSUPPORTED=1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:33:12 +02:00
Ludovic Marie b7098f6870 Fix up the merged parity branches so the workspace builds
Resolve the places where union merges kept both sides: the persist
rewrite of level.dat now carries item components, XP seed and effects;
mob ticking uses the creatures module (with Thorns); explosions damage
mobs through the new damage source and emit particles; TNT's white
flash moves to overlay 5 since clouds use 4; End gateway data follows
the new dimensions/ folder layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 23:27:24 +02:00
Ludovic Marie 2b4982ab4c Merge remote-tracking branch 'origin/wip/parity-render' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-client/src/containers.rs
#	crates/horizon-client/src/entity.wgsl
#	crates/horizon-client/src/game.rs
#	crates/horizon-client/src/game/control.rs
#	crates/horizon-client/src/gfx.rs
#	crates/horizon-client/src/lib.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie 3c45d66e2e Merge remote-tracking branch 'origin/wip/parity-mobs' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-client/src/game.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie 30b14ac3a9 Merge remote-tracking branch 'origin/wip/parity-ui' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-client/src/game.rs
#	crates/horizon-client/src/lib.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie dfd093f078 Merge remote-tracking branch 'origin/wip/parity-net' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-client/src/game.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie ce1a593957 Merge remote-tracking branch 'origin/wip/parity-structures' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-world/examples/chunkgen_bench.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie 4bb7b917f9 Merge remote-tracking branch 'origin/wip/parity-blocks' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-client/src/containers.rs
#	crates/horizon-client/src/game.rs
#	crates/horizon-client/src/game/control.rs
#	crates/horizon-client/src/save.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie 9ab2cd7542 Merge remote-tracking branch 'origin/wip/parity-stations' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-client/src/game.rs
#	crates/horizon-client/src/save.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie f8edb430d2 Merge remote-tracking branch 'origin/wip/parity-persist' into t3/minecraft-parity
# Conflicts:
#	crates/horizon-client/src/chunk.rs
#	crates/horizon-client/src/game.rs
2026-10-08 23:19:58 +02:00
Ludovic Marie 95d1371dae WIP snapshot: unfinished render parity work (paused mid-task, may not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:40:00 +02:00
Ludovic Marie 62d99a4212 WIP snapshot: unfinished mobs parity work (paused mid-task, may not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:40:00 +02:00
Ludovic Marie c7d3ea9786 WIP snapshot: unfinished ui parity work (paused mid-task, may not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:40:00 +02:00
Ludovic Marie ee5e2de7bb WIP snapshot: unfinished structures parity work (paused mid-task, may not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:40:00 +02:00
Ludovic Marie 445a3ec4f2 WIP snapshot: unfinished blocks parity work (paused mid-task, may not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:40:00 +02:00
Ludovic Marie bb0ae764f9 WIP snapshot: unfinished net parity work (paused mid-task, may not build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 21:39:59 +02:00
Ludovic Marie 9e3f4276fe Throw potions with vanilla's shootFromRotation spread
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:53:14 +02:00
Ludovic Marie 716423a970 Add End flashes to the End sky and lighting
EndFlashState: one flash per 600 clock ticks with seeded offset, duration
and direction; the end_flash sprite in the sky, the flash intensity added to
the lightmap sky factor and the delayed weather.end_flash sound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:52:58 +02:00
Ludovic Marie f573c77082 Add vanilla options screens, key binds, languages and resource packs
Options, Video Settings, Music & Sounds, Controls, Key Binds, Mouse, Chat,
Accessibility, Language (with search) and Resource Packs screens in the
HeaderAndFooter/OptionsList layouts. options.txt uses vanilla keys and
encodings (unknown lines kept), including key_<mapping>:key.keyboard.x
binds that the input path honours, per-source volumes, brightness, VSync,
max framerate, fullscreen (F11), chat and font options. Languages reload
live; resource packs (folders, zips, Programmer Art, High Contrast) are
layered over the vanilla resources through an overlay root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:51:44 +02:00
Ludovic Marie 481f427e3a Save status effects, show thrown potions, test loot enchantments and vanilla data
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:51:16 +02:00
Ludovic Marie caefa43483 Check Horizon player files in vanilla with a bare protocol client
tools/vanilla_login.py joins an offline 26.3 server (login and
configuration phases) so the server loads players/data/<uuid>.dat;
vanilla_world_check.py gains 'login NAME SECONDS' and 'sleep S' steps and
disables the whitelist. With it, vanilla loads a Horizon player with its
position, rotation, inventory, selected slot and abilities, and Horizon
reads the file vanilla writes back.

A new world's first spawn becomes its world spawn (no bogus respawn
point), the player UUID is kept across saves, the selected hotbar slot is
restored, and game_rules.dat only holds rules vanilla knows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:49:59 +02:00
Ludovic Marie 68ffc31a0e Run neighbour and shape updates after landing writes (farmland trampling)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:49:45 +02:00
Ludovic Marie 1ee753254d Tick eyeblossoms, potted eyeblossoms, turtle eggs and dried ghasts
Eyeblossoms follow the day timeline's eyeblossom_open attribute (waking
neighbours in vanilla scan order), turtle eggs crack and hatch on sand with
the timeline hatch chance, and dried ghasts hydrate while waterlogged. Adds
LevelAccess::day_time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:47:50 +02:00
Ludovic Marie 9e77a48720 Throw eyes of ender towards the nearest stronghold
EnderEyeItem.use away from portal frames: the nearest ring position of
minecraft:strongholds (ChunkGenerator.getNearestGeneratedStructure, compared
at the chunk's (8, 32, 8) block, located at its corner), an EyeOfEnder
signalled towards it with vanilla's flight curve, launch and death sounds,
dropped back as an item four times in five after 80 ticks. The generator
exposes its cached concentric ring positions for this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:47:41 +02:00
Ludovic Marie 9a3bf42574 Add a differential test of enchanting-table offers against vanilla
A Java oracle loads the vanilla data pack's enchantment registry, binds
item components and replays EnchantmentMenu's cost, clue and enchantment
selection draws; tools/test_enchanting_parity.py compares it with the Rust
stations module for every enchantable item and the book over 32 seeds and
7 bookshelf counts (51,744 lines match).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:47:03 +02:00
Ludovic Marie d3659d9652 Match vanilla structure placement block for block
- Legacy jigsaw elements apply STRUCTURE_AND_AIR last, after jigsaw
  replacement (outposts no longer carve air where jigsaws sat).
- Templates without a known shape run StructureTemplate's neighbor shape
  updates (updateShapeAtEdge, then updateFromNeighbourShapes) through
  level::Behaviours: snowy grass under igloos, stair shapes and fence
  connections in shipwrecks.
- The placement oracle keeps going through structure entities (a level
  stand-in with no enabled features) and compares brushable-block loot.

With block behavior exports present, 18 chunks of seed 1 covering
villages, igloo, outpost, mineshafts, shipwreck, warm ocean ruin, buried
treasure, ruined portal, trial chambers, monument, mansion, stronghold,
ancient city, trail ruins and a jungle temple match vanilla exactly,
blocks and block-entity loot seeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:46:03 +02:00
Ludovic Marie 959588e2be Merge section mesh parity work (agent/render-mesh)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:45:36 +02:00
Ludovic Marie 5b1936d5d5 Form snow and ice and fill cauldrons in rain from biome temperatures
Answer ServerLevel.tickPrecipitation (Biome.shouldFreeze, shouldSnow,
getPrecipitationAt) and Level.isRainingAt from the worldgen bundle's biome
temperatures, so snow accumulates, water freezes, cauldrons fill, farmland
stays moist and fire is extinguished in rain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:43:25 +02:00
Ludovic Marie 9cb03b932e Entity shadows for mobs, dropped items and experience orbs
shadows.rs ports EntityRenderer.extractShadow and ShadowFeatureRenderer
with the vanilla per-renderer shadow radii and strengths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:43:25 +02:00
Ludovic Marie 26858f039d Note meshing cost in the section meshing parity doc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:43:25 +02:00
Ludovic Marie 1861320d75 Tidy clippy findings in the station modules
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:41:41 +02:00
Ludovic Marie ece28615a7 Document the section meshing parity gate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:40:42 +02:00
Ludovic Marie 66b64edf84 Screen effects: in-wall, underwater, fire, vignette, pumpkin and portal overlays
screen_effects.rs ports ScreenEffectRenderer and the Hud camera overlays
as clip-space quads drawn by a new gfx pass (alpha and vignette blend
modes, repeating atlas sprites), with tick-driven vignette brightness
and portal intensity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:40:25 +02:00
Ludovic Marie 5c69e0521a Save worlds in the vanilla 26.3 layout with entities, ticks, light and heightmaps
Worlds now use 26.3's layout and files: dimensions/minecraft/<dim>/{region,
entities}, level.dat with singleplayer_uuid, players/data/<uuid>.dat and the
saved-data files for weather, world clocks (day time), world generation
settings and game rules. Older Horizon saves are migrated on open.

Chunks are written like SerializableChunkData: vanilla's short palette form
for default states, SkyLight/BlockLight layers, the four FULL heightmaps,
block_ticks/fluid_ticks from the tick scheduler, chest/trapped chest/barrel
and furnace block entity IDs, and everything Horizon does not simulate
(unknown block entities, structure references, post-processing) kept from
the loaded chunk. Partially generated vanilla chunks are regenerated
instead of loading as holes.

Mobs, item entities, experience orbs, arrows and falling blocks are saved
per chunk in entities/*.mca with vanilla NBT (entity_nbt.rs), keeping each
loaded entity's UUID and unknown fields; entity types Horizon does not
simulate are written back unchanged. Entities leave the world with their
chunk and come back when it loads.

examples/save_parity re-encodes every chunk of a vanilla-saved world and
compares blocks, biomes, heightmaps, light, block entities and ticks
(identical on three reference worlds apart from vanilla's stale worldgen
light). A Horizon save of a vanilla world opens in the vanilla server with
its mobs, items, arrows and unknown entities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:40:19 +02:00
Ludovic Marie dd86e16da2 Multiplayer: chat input by logical keys, net debug log, probe tick end
The chat box reads logical keys so layouts and virtual keyboards type
what they show; container screens hide the chat like vanilla's layering;
HORIZON_NET_DEBUG=1 logs serverbound packets; horizon-ctl respawn; the
probe ends a client tick after teleports (the server accepts one
position per tick).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:40:01 +02:00
Ludovic Marie af6d8610a2 Move items with hoppers, dispensers and droppers; feed comparators from containers
Port HopperBlockEntity (push/pull, item entities, furnace faces, double chests,
transfer cooldowns), DispenserBlock/DropperBlock.dispenseFrom with the default,
bone meal, TNT, flint and steel, bucket and arrow behaviours, and container
comparator signals with setChanged notifications. Hopper and dispenser/dropper
block entities save with their own ids; their screens use the vanilla layouts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:39:36 +02:00
Ludovic Marie 2f74209da1 Port vanilla mob AI framework: goals, A* pathfinding, controls, projectiles
Mobs now run vanilla's tick order with a GoalSelector/target selector
(priorities, MOVE/LOOK/JUMP/TARGET flags), PathNavigation over the
walk/swim/fly/amphibious node evaluators, Move/Look/Jump/BodyRotation
controls and LivingEntity travel in air, water and lava. Path types,
spawn surfaces and keyframe animations come from a new exporter
(VanillaMobDataExporter -> mob-data.json). Farm animals, zombies,
skeletons, creepers and spiders get their vanilla goals; projectiles
(arrows, snowballs, eggs, ender pearls, fireballs) share one system;
natural spawning follows NaturalSpawner with category caps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:39:26 +02:00
Ludovic Marie 784c6b4e79 Apply generation postprocessing when chunks go live
LevelChunk.postProcessGeneration: positions worldgen marked (aquifer fluids
next to open air, sculk veins, fences, ...) get their fluid tick, LiquidBlock
tick or shape update once the chunk and its neighbours are loaded, so cave
water and lava start to flow and bubble columns rise. Decoration now marks
the BlockBehaviour.Properties.postProcess positions of WorldGenRegion.setBlock
(mushrooms themselves, above soul sand and magma blocks), which vanilla's
bubble columns over underwater magma come from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:39:17 +02:00
Ludovic Marie 708451f28d Add villager trading: data-driven offers, merchant pricing and the trading menu
Offers come from the trade_set/villager_trade registries through each
set's RandomSequence (world seed + sequence id), with merchant predicates,
enchant_with_levels/enchant_randomly/filtered/set_potion modifiers and the
additional trade cost. MerchantOffer pricing (demand, price multiplier,
special price), payment matching and stock follow vanilla; the trading menu
matches MerchantScreen and levels the merchant up with new offers.
horizon-ctl 'trade PROFESSION [LEVEL]' opens it until villagers exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:39:08 +02:00
Ludovic Marie 0c073bb377 Cover every model state and dense mixed scenes in the section mesh gate
Adds the all-states catalogue and dense random scenes with fluids, a
--quick mode, fixture meshing time in the report, and clippy fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:39:01 +02:00
Ludovic Marie 4fb63e2777 Port FogRenderer and the vanilla sky disc
fog.rs implements the fog environments (atmospheric with rain fog,
water with water vision, lava, powder snow, blindness), the camera fog
type and computeFogColor (sunrise tint, sky mix, void darkness). The
sky shader evaluates SkyRenderer's sky disc, sunrise/sunset fan and dark
disc per pixel with sky fog; clouds fade by the cloud fog end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:35:47 +02:00
Ludovic Marie ed7e28101a Join vanilla servers: multiplayer client on top of horizon-protocol
A network thread logs into offline-mode servers, runs the configuration
phase (registries, tags, known packs, code of conduct) and forwards play
packets; keep-alives and pings are answered there. game/remote.rs drives
the game from the connection: server chunks feed the streamer (remote
mode: no generation, unload on forget), block updates, entities with
interpolation (mobs with models, other players, dropped items), health,
food, experience, time, weather, respawn, dimension changes, container
menus and inventory sync, chat and system messages, plus movement,
mining with prediction sequences, use-item, attacks and container clicks
sent like LocalPlayer and MultiPlayerGameMode. The title gets a
Multiplayer button with a servers.dat list, Add/Edit, Direct Connection
and a Disconnected screen. horizon-ctl gains connect, chat, respawn and
disconnect; --server/--name join at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:32:15 +02:00
Ludovic Marie 63c5ba018d Add the End to the client: portals, gateways, exit portal and sky
- Dim::End (DIM1 region folder, End environment attributes, sky light).
- Eyes of ender fill End portal frames; a complete ring of twelve
  (EndPortalFrameBlock portal shape) lights the 3x3 End portal.
- End portals travel to the End (obsidian platform at 100 49 0, facing
  west) and back to the world spawn; dying in the End respawns in the
  Overworld.
- Without the ender dragon the fight counts as won: the active exit
  portal (EndPodiumFeature) and the first gateway of the seed's
  shuffled ring are placed once the main island is loaded.
- End gateways: TheEndGatewayBlockEntity exit search (chunk scan,
  findValidSpawnInChunk, END_ISLAND fallback, findTallestBlock), exit
  gateways linked both ways and kept in DIM1/horizon-end-gateways.json;
  worldgen return gateways lead exactly to the End spawn.
- End sky box (end_sky.png tiled, 0x282828), End portal and gateway
  surfaces and the spike End crystals (EndCrystalModel animation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:30:47 +02:00
Ludovic Marie 61c803095e Apply status effects and enchantment effects in gameplay
Potions can be drunk, thrown (splash/lingering) and filled from water;
effects tick like MobEffectInstance (hidden effects, periodic heal/poison/
wither/hunger), drive movement (jump boost, slow falling, levitation,
speed/slowness modifiers), damage (resistance, fire resistance) and mining
(haste/fatigue), and show as HUD icons. Enchantments affect gameplay from
their data components: efficiency, aqua affinity, unbreaking, sharpness/
smite/bane, knockback, fire aspect, power, infinity, protection family and
feather falling, thorns, mending, armor attributes, and fortune/silk touch/
looting in loot tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:30:45 +02:00
Ludovic Marie c9eeed0300 Add chat, the vanilla command set and game rules to the game
ChatComponent/ChatScreen port: wrapped 100-line history with the 200-tick
fade, scrolling, system message indicator, input history, argument
colouring, usage hints, parse errors and tab completion. Commands:
help, gamemode, defaultgamemode, give, teleport/tp, time (26.3 clocks and
markers), weather, kill, summon, setblock, fill, clone, experience/xp,
gamerule, difficulty, seed, spawnpoint, setworldspawn, clear, locate biome,
say, me, msg, list. Game rules gate the clock, weather, random ticks,
keep_inventory, death messages and command feedback, and are saved to
data/minecraft/game_rules.dat. F1 hides the HUD, F2 saves screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:29:51 +02:00
Ludovic Marie 33396ebff1 Add primed TNT with an 80-tick fuse and port ServerExplosion
PrimedTnt entities (gravity, drag, bounce, fuse) spawn from redstone, fire,
flint and steel / fire charges, unstable TNT broken by players and chain
explosions (random short fuse). TntRenderer swell and white flash via a new
entity overlay. Explosions use vanilla ray marching over a Java HashSet
(matching iteration and shuffle draws), exposure-scaled damage and knockback
for players, mobs, items and TNT, TNT drops without decay, merged drops and
container contents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:29:46 +02:00