Commit Graph

4750 Commits

Author SHA1 Message Date
Ludovic Marie 333135f672 Render the first-person arm and held item
Port FirstPersonHandsAndItemsRenderer: the right arm (player model,
default skin) or the held item with its firstperson_righthand display
transform, the arm swing (6-tick swing on attack, mining and placing)
and the equip height animation, drawn after clearing depth so it never
clips into the world.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:41:28 +02:00
Ludovic Marie 6c2bf5c138 Port speleothem growth, dripstone fluid transfer and cauldron drips
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:41:08 +02:00
Ludovic Marie f3770ce7c8 Add experience orbs, levels and bows
Ores and player kills drop experience split into vanilla orb sizes;
orbs fall, home in on the player within 8 blocks and are collected one
every 2 ticks, filling the XP bar with vanilla's level curve and the
level-up sound every 5 levels (saved as XpLevel/XpP/XpTotal). Bows
charge while held (BowItem power curve), consume arrows outside
creative, and player arrows hit mobs for ceil(speed * 2) damage with
critical bonuses.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:28:29 +02:00
Ludovic Marie 9698642804 Port pistons: structure resolver, block events and moving-piston ticking
Also fix PushReaction to the 26.3 enum (PUSH_PULL, PUSH, POPPED,
IMMOVEABLE, IGNORE_ENTITY).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:26:12 +02:00
Ludovic Marie f9fc6c8ffa Add structure templates, processors and template/fossil features
Load gzip NBT structure templates lazily with vanilla palette ordering,
apply processors (rule, block_ignore, block_rot, gravity, protected_blocks,
capped, jigsaw_replacement, block_age, lava_submerged) and place them with
rotation/mirror, waterlogging and block-entity data (loot seeds). Per-state
rotate/mirror tables and template ordering flags come from a new vanilla
exporter. Template and fossil features now decode, so desert wells,
fossils and sulfur springs generate; their block entities are kept on the
ProtoChunk. The prepare script bundles templates, processor lists, pools,
structures and structure sets.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:17:49 +02:00
Ludovic Marie 619339dca2 Add armor, buckets and tool block actions
Equippable items swap into armor slots (inventory screen slots with the
empty-slot icons, saved as vanilla slots 100-103) and apply their
attribute modifiers, so the validated vanilla armor and toughness
damage reduction applies; armor loses max(1, damage/4) durability per
hit. Buckets pick up and place water and lava sources; hoes till,
shovels make paths, axes strip logs and wood, flint and steel and fire
charges light fire, with vanilla sounds and tool durability.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:15:26 +02:00
Ludovic Marie 6dca05a35f Cull sections hidden behind opaque blocks (vanilla occlusion graph)
Each meshed section records VisGraph face connectivity through
non-opaque blocks; the renderer walks sections breadth-first from the
camera through connected faces without stepping back towards it, as
SectionOcclusionGraph does, and only draws reachable sections. The walk
is recomputed when the camera changes section or visibility changes,
and disabled when the camera is inside an opaque block.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:07:57 +02:00
Ludovic Marie a25aec0756 Document level integration and avoid per-call class-chain clones
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:06:50 +02:00
Ludovic Marie 330eed2769 Add precipitation ticks, chorus flower growth and vanilla lava double random tick
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:59:21 +02:00
Ludovic Marie bde9c632bb Port getStateForPlacement, BlockItem.place and useWithoutItem
PlaceContext resolves the replaced position as BlockPlaceContext does
(canBeReplaced per class, nearest looking directions), place_block runs
BlockItem.place with standing/wall and double-high items and setPlacedBy,
and use_without_item covers doors, trapdoors, gates, buttons, levers,
diodes, note blocks, cakes, composters, berries, pots, beds and menus.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:47:01 +02:00
Ludovic Marie 6907d9cdf8 Merge vanilla feature algorithms into chunk decoration
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:45:06 +02:00
Ludovic Marie a13799e042 Add title screen with world selection and creation
The game opens on a vanilla-style title screen (logo, Singleplayer,
Quit) over the spinning title panorama. Select World lists saves by
last play with game mode; Create New World takes a name, a seed
(numbers or text hashed like vanilla) and the game mode, and finds a
free folder name. Save and Quit returns to the title. README and the
parity status now describe the playable Rust game.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:44:42 +02:00
Ludovic Marie 6b80229269 Decode clamped_normal integer providers
Mth.normal sampling with float clamping and a saturating int cast, as used
by the pointed dripstone and sulfur spike placement offsets.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:38:28 +02:00
Ludovic Marie f11931e1d3 Add level block-behaviour module: setBlock, neighbour/shape updates, fluids, redstone, ticks
Behaviours loads per-block class chains, instance configuration and per-state
support/signal/fluid facts exported by VanillaBlockBehaviourExporter, and ports
Level.setBlock with the CollectingNeighborUpdater, updateShape for every
overriding class, canSurvive, FlowingFluid spreading with lava/water
interactions, gravity blocks, rails, tripwires, redstone wire/torches/diodes,
scheduled ticks and random ticks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:22:03 +02:00
Ludovic Marie 253533930c Timed eating, hunger exhaustion and death drops
Food is consumed by holding use for 32 ticks with vanilla's eating
sounds and item particles in the last 25 ticks and a burp on finish
(FoodData.eat). Breaking blocks and attacking add 0.005 and 0.1
exhaustion. Dying throws the inventory out like Inventory.dropAll.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:14:06 +02:00
Ludovic Marie 77ea858a4b Render vanilla sun, moon phases, stars and fancy clouds
Celestial bodies follow SkyRenderer: the sun (30) and moon (20) at height
100 on a frame rotated by the timeline angles, the 1500 seeded stars at
the timeline star brightness, drawn additively behind terrain. Clouds
follow CloudRenderer: 12x4x12 cells from clouds.png drifting 0.03 blocks
per tick at the cloud height with per-face shading and the timeline
cloud colour. Adds --time and --look options for visual checks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 01:11:57 +02:00
Ludovic Marie 6294126f70 Add chests, barrels and furnaces with block entities
Chests, trapped chests and barrels hold 27 slots; furnaces, blast
furnaces and smokers tick like AbstractFurnaceBlockEntity.serverTick,
reading fuel burn times and speed multipliers from the data-driven
context providers and toggling the LIT state. Container screens use
the vanilla layouts and progress sprites. Contents drop when broken,
persist in Anvil block_entities, and chests render from the vanilla
chest model with the eased lid animation. Entity model export now
writes NaN UVs of degenerate faces as 0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 00:57:56 +02:00
Ludovic Marie 68fc42013c Merge feature algorithms branch and wire generator decoration hooks
Merge worktree-agent-a8b4c3c64b61988c7 (trees, ores, vegetation, lakes,
geodes, dungeons, icebergs, dripstone, fungus, end spikes). The decoration
world now supplies the world seed, the write-zone check, raw section
writes for bulk ore placement and full-block collision tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 00:41:47 +02:00
Ludovic Marie feb53b02f0 Add mobs: spawning, AI, combat, drops, arrows and explosions
Mob types use vanilla's exported dimensions and default attributes and
its baked LayerDefinitions models with walk/arm/swell animations.
Creature packs spawn at chunk generation from biome spawn lists and
monsters spawn in the dark near the player with vanilla's light checks.
Passive mobs stroll, look and panic; zombies, spiders and creepers chase
(creepers swell and explode with the ray-based vanilla explosion);
skeletons shoot arrows. Player melee uses the attack-strength charge,
crits and knockback; deaths drop from entity loot tables.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 00:37:52 +02:00
Ludovic Marie 6b2c4325ea Add tree/spike unit tests and harness hooks for sculk and gateways
Unit tests pin Java HashSet bucket iteration, Fisher-Yates draw order and
the seed-derived End spike layout. The oracle ignores sounds, level
events and entity queries; the Rust fixture accepts end-gateway
configuration; FEATURE_FILTER limits a rerun to matching features.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 00:23:15 +02:00
Ludovic Marie 22a751f698 Play on vanilla-generated terrain with a land spawn search
Wire the vanilla overworld generator (noise, aquifers, surface, carvers and
implemented placed features) into chunk streaming. Search outward in a
spiral for a solid, dry surface to spawn on, as vanilla avoids ocean spawns.
Give entity-dependent collision queries the defaults for players and mobs,
load only JSON recipes, and export entity types/attributes for mobs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 00:14:22 +02:00
Ludovic Marie 558dc6b7d3 Bind block behavior for decoration placement checks
Load Java-exported block properties, face support, collision and survival
rules from the worldgen bundle's blocks/ directory (copied there by
prepare_native_client.py) and bind them with the state-provider catalog,
so simple-block, patch and vegetation features decode and run. The
decoration world answers survival, sturdy-face, collision and attachment
queries, draws WorldGenRegion's positioned level random, and treats the
entity-free, unlit proto region as unobstructed with zero light.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 00:00:45 +02:00
Ludovic Marie dfda7acef2 Port end spike feature with seed-derived spike layout
minecraft:end_spike reproduces SpikeCacheLoader (seed-keyed shuffled
sizes), obsidian columns, iron-bar cages, the crystal's yaw draw, bedrock
and fire; the crystal entity is handed to a new spawn_end_crystal world
hook.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:45:55 +02:00
Ludovic Marie e7939fe6e3 Merge vanilla overworld generator with decoration
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:44:19 +02:00
Ludovic Marie 8d87f6c45f WIP: block behaviour level module checkpoint
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:44:04 +02:00
Ludovic Marie 6406c588e7 WIP: staged proto/decorate/finish streaming and vanilla terrain adapter
Streaming now supports vanilla's generation stages (proto chunk, 3x3
decoration, finalization). vanillagen.rs binds the overworld generator
from the generator branch; it is not yet registered in lib.rs until that
branch is merged. Adds dropped items, particles, crack overlay, sounds,
Anvil saves and the entity model exporter. Build not yet verified.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:38:15 +02:00
Ludovic Marie 9996768c0d WIP: checkpoint stopped agent work
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:38:04 +02:00
Ludovic Marie a819c54e66 WIP: checkpoint stopped agent work
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:38:01 +02:00
Ludovic Marie df8d9d7184 WIP: checkpoint remaining interrupted agent changes
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:30:48 +02:00
Ludovic Marie b6e6ac06ca WIP: checkpoint remaining interrupted agent changes
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:30:45 +02:00
Ludovic Marie 3777c9009b WIP: playable client — streaming world, lighting, HUD, crafting, saves, audio, items
Checkpoint of the playable client rewrite before build verification.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:24:14 +02:00
Ludovic Marie f79b6aaced WIP: checkpoint interrupted agent work
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:23:56 +02:00
Ludovic Marie 3adb14529b WIP: checkpoint interrupted agent work
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:23:53 +02:00
Ludovic Marie 42f8960604 WIP: checkpoint interrupted agent work
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 23:23:48 +02:00
Ludovic Marie 254dda89a3 Port speleothem cluster and large dripstone; widen feature parity corpus
Adds minecraft:speleothem_cluster (Column scans, pools, merged tips) and
minecraft:large_dripstone (wind offsets, base embedding, height curve).
The differential harness now resolves named features and placed features
lazily on the Java side, logs dungeon loot/spawner block entities, uses
the world seed and survival rules, and exercises every other configured
feature over surface, cave, flooded-cave, ocean and nether worlds.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 20:24:16 +02:00
Ludovic Marie 261a8091b6 Add native Marsaglia polar Gaussian sampling and clamped normal floats
RandomSource gains next_gaussian with per-source cached second values,
reset by set_seed for the legacy and Xoroshiro sources as in vanilla.
The WorldgenRandom adapter keeps its own cache that native setSeed does
not reset. FloatProvider decodes and samples minecraft:clamped_normal.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 20:24:16 +02:00
Ludovic Marie 13038b4f18 Port vegetation patch, coral, huge mushroom, multiface, lake, dungeon, geode, iceberg and root system features
Adds minecraft:vegetation_patch and waterlogged_vegetation_patch (native
HashSet surface order), coral_tree/coral_claw over nested placed
features, huge_red/brown_mushroom, multiface_growth (glow lichen and
sculk vein spreaders), lake, monster_room (chest reorientation, loot
seed and spawner entity hooks), geode (seeded parity noise via a new
world-seed query), iceberg and root_system. Catalog expansion resolves
their nested placed-feature holders.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 20:04:57 +02:00
Ludovic Marie 03d32fc788 Add tree, fallen-tree and ore differential parity harness
Decodes every vanilla 26.3 tree, fallen_tree, ore and scattered_ore
configured feature from the authenticated JAR, places each with both
random kinds over layered synthetic worlds backed by native proto-chunk
sections, and compares ordered writes, beehive occupants, post-processing
marks, results, random tails and the final block diff with Rust.

First run: 2783 of 3018 fixtures identical; every ore fixture matches.
The remaining differences are StructureTemplate.updateShapeAtEdge
neighbor shape updates (faceless vines and unsupported plants beside the
tree), which the Rust world hook does not yet implement.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 20:04:57 +02:00
Ludovic Marie 8178ccede2 Decorate generated chunks with implemented placed features
Resolve each possible biome's placed features in vanilla encounter order
into a FeatureDecorationPlan and run FEATURES over a 3x3 neighborhood
through a WorldGenRegion-style adapter (write radius, zoomed biomes,
biome filters, freeze/snow weather). Roots whose algorithm or bindings
are missing are skipped and reported. Add worker stage timings, CPU-time
reporting in the bench, and a parameter-report quantization test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 20:04:38 +02:00
Ludovic Marie 939eabe627 Speed up section palette writes and noise-fill heightmap updates
Section palettes hash state IDs with a multiplicative hasher instead of
SipHash, and fill_noise skips heightmap updates at or below
first-available - 2, which are no-ops. Material-stage parity output is
byte-identical to vanilla.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 20:04:38 +02:00
Ludovic Marie 50b9995358 Port vanilla tree, fallen tree and blob ore features
Adds minecraft:tree with every 26.3 trunk placer (straight, forking,
giant, mega_jungle, dark_oak, fancy, bending, upwards_branching, cherry,
poplar), foliage placer (blob, fancy, bush, acacia, spruce, pine,
mega_pine, jungle, dark_oak, random_spread, cherry, poplar), the mangrove
root placer, all tree decorators, two/three-layer feature sizes and the
native leaf-distance pass with Java HashSet iteration order. Adds
minecraft:fallen_tree and minecraft:ore (BulkSectionAccess-style raw
section writes with write-zone checks).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 19:14:26 +02:00
Ludovic Marie 497cb8e0e3 Add production noise-chunk generator, worldgen resource bundle and bench
GeneratorData loads a worldgen bundle (written by prepare_native_client.py
to the client resource dir) once; OverworldGenerator binds a seed and shares
compiled samplers across threads; GeneratorWorker generates vanilla
BIOMES..TERRAIN proto chunks (noise fill with aquifers, material surface,
carvers) that match the material-stage parity dumps. Decoration is stubbed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 19:14:23 +02:00
Ludovic Marie 8982a14485 Lowercase horizon repo links and fix orphaned comparison sentence
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 19:09:28 +02:00
Ludovic Marie c32dd0f6ae Rename README to Horizon and fix orphaned comparison sentence
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 19:09:19 +02:00
Ludovic Marie 5799bc6dc6 Load every vanilla block model and export gameplay facts
Model catalog now binds all registered blockstates. Sprites accept
fractional alpha, interpolated animations and non-16px frames
(resampled into the shared 16px array). Resource preparation extracts
every jar asset and data file, exports per-state light/hardness/sound
facts through a vanilla exporter, and bundles item default components
from vanilla's data generator reports.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 18:52:46 +02:00
Ludovic Marie 082cbb4077 Apply pending player attribute callbacks during resident simulation
Refresh scale dimensions and clamp health and absorption after movement, preserving native callback order and queued synchronization. Replay per-reference JVM identities in the scene comparison and cover changing limits, modifiers and low tunnels. Waypoint callbacks remain explicit requests for the future manager runtime.
2026-10-07 18:27:58 +02:00
Ludovic Marie 4e01780255 Validate resident crouching, pose dimensions and ledge backoff
Connect Shift input timing, dry pose fit, movement slowdown and eye height to the resident walking scene. Compare exact evolving state against pinned native client/server methods and record Linux window validation. Full gameplay and release acceptance remain unfinished.
2026-10-07 18:15:56 +02:00
Ludovic Marie 20714b5d77 Checkpoint resident crouching and pose integration in progress
Back up the current Rust pose, collision, ledge and native oracle work before further integration. This is a work-in-progress checkpoint: probe output, camera integration and differential validation are still pending; full vanilla parity is not claimed.
2026-10-07 18:08:04 +02:00
Ludovic Marie 24ce21abee Connect native-validated sprint input to resident movement and hunger 2026-10-07 17:55:29 +02:00
Ludovic Marie ecb3ebfd34 Account for accepted movement distance in resident player hunger 2026-10-07 17:29:13 +02:00