Commit Graph

3685 Commits

Author SHA1 Message Date
Ludovic Marie e25fcb2994 Test that ender items round-trip and other player data survives
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:02:58 +02:00
Ludovic Marie 6ae36295e2 Add fishing
FishingRodItem casts and reels in with vanilla's sounds and rod damage.
The hook flies, bobs, runs the lure and bite timers (rain and sky speed,
the Lure enchantment), tracks open water, hooks mobs and pulls them, and
retrieving a bite rolls gameplay/fishing with Luck of the Sea, open-water
treasure, experience and the catch thrown at the player. Loot rolls now
honour luck (entry quality, bonus rolls) and fishing-hook predicates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:01:19 +02:00
Ludovic Marie ed9a8e9ba1 Add zombie horses, skeleton horses and giants
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:55:37 +02:00
Ludovic Marie f48407ff0c Add shulker boxes and ender chests
Shulker boxes are 27-slot containers that refuse other boxes, keep their
contents when broken, exploded or dropped (the item's container
component) and restore them when placed. Ender chests show the player's
ender inventory, saved as EnderItems. Both play their open and close
sounds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:50:57 +02:00
Ludovic Marie f4539717fc Add the totem of undying
The combat kernel's death-protection hook fires for a totem in either
hand unless the damage bypasses invulnerability; the game then uses up
the totem (main hand first), sets health to 1, clears effects, applies
regeneration II, absorption II and fire resistance, and plays the totem
sound and 30-tick particle emitter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:46:19 +02:00
Ludovic Marie 11a94137bb Keep entity_nbt's tests last
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:42:06 +02:00
Ludovic Marie 177fab4e34 Add boats and rafts
AbstractBoat's status (under water, in water, on land with the averaged
block friction, in air), floatBoat buoyancy and drag, controlBoat
paddling with turn and acceleration, collisions, paddle sounds and
animation, riding (seat attachment, 105 degree head clamp, out of
control under water) with dismounting forward onto floor, BoatItem
placement on blocks or the water surface, VehicleEntity damage and
breaking, entity saving and AbstractBoatRenderer with the hurt wobble.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:41:05 +02:00
Ludovic Marie d66a87c105 Add armor stands
ArmorStandItem placement snapped to 45 degrees, gravity, interactAt
equipment swaps by clicked height, the two-hit break with drops (one hit
in creative), entity saving (equipment, Small, ShowArms, NoBasePlate,
Invisible, Marker) and ArmorStandRenderer with the default pose, hit
wobble and humanoid armor layers from the equipment assets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:28:55 +02:00
Ludovic Marie 3642ea3bb0 Add item frames and glow item frames
Frames hang on any face (ItemFrameItem), survive per ItemFrame.survives,
take one item and rotate it in eight steps, give the item back and then
break on attack, save as vanilla entities (Facing, Item, ItemRotation,
ItemDropChance, Fixed, Invisible) and render the baked frame model with
the item at half size; glow frames light their item fully.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:19:45 +02:00
Ludovic Marie 9232dd1b78 Add paintings
Painting items hang on wall faces with Painting.create's choice (the
largest placeable variants that fit, at random), HangingEntity.survives
rechecked every 100 ticks (collision, solid support, no overlap),
breaking by attack with drops and sounds, entity saving (variant,
facing, block_pos) and PaintingRenderer's front, back and edge quads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:13:01 +02:00
Ludovic Marie d5438f61e8 Add /tellraw and /title
ComponentArgument reads SNBT or JSON text components (text, translate
with fallback, selector, keybind, colours, formatting, extra, lists);
selector components resolve for the command source. /title drives the
Gui title, subtitle, times and action bar, drawn with vanilla's fades
and 4x / 2x scales over the hotbar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 01:04:21 +02:00
Ludovic Marie a5db4eb8e3 Add /execute
ExecuteCommand's tree with redirects: as, at, positioned (as), rotated
(as), facing (entity), align, anchored, in, and if/unless block, entity,
loaded and dimension, as conditions or tests. Commands run with a real
command source (entity, position, rotation, anchor): @s, coordinates,
local coordinates from the anchor and /say and /me names follow it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:58:47 +02:00
Ludovic Marie 2030284a0f Add the off hand and shields
Off hand: the InventoryMenu shield slot, the hotbar's off-hand slot,
swapping with F, saving as slot 150, and death drops (which also missed
armor). Shields and other blocks_attacks items rise from either hand,
block after their delay through the combat kernel's applyItemBlocking
hooks (angle, damage reductions, bypassing types, piercing arrows), lose
durability, play their sounds, push the blocker back on partial blocks
and get disabled by axes. Using any item now slows walking by its
use_effects speed multiplier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:52:51 +02:00
Ludovic Marie 8d4b151ec9 Add field-of-view effects and the spyglass
Camera.tickFov / calculateFov: movement speed (sprint, speed effects),
bow draw and spyglass zoom ease in at half a step per tick, with the
death and underwater/lava narrowing. The spyglass zooms to 0.1, hides
the hand, drops the 8x mouse factor and draws the scope overlay; it
stops after 1200 ticks or on release with vanilla's sounds. Inventory
icons of display_context item models now use their gui case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:40:30 +02:00
Ludovic Marie 488f8bd030 Make clippy pass with -D warnings
Apply clippy's fixes, fix the remaining lints by hand and allow, for the
whole workspace, the lints that one-to-one ports of vanilla's Java
naturally trip (argument counts, index loops, nested types, large enum
variants).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:32:50 +02:00
Ludovic Marie df14adbfba Format the workspace with rustfmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:28:32 +02:00
Ludovic Marie 2a7f199b5f Fix the tree feature harness and the scene probes
The tree fixture world now applies vanilla's edge shape updates for its
obstacles (faceless vines, unsupported short grass), the vanilla fixture
world answers environment attributes with defaults, and features that
need structure templates or the pale moss registry, directly or through
named features, are left to the decoration harnesses. The scene probes
build their scene with World::test_scene since TestWorld was removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 00:28:31 +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 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 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 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