Commit Graph

2923 Commits

Author SHA1 Message Date
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 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
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
Ludovic Marie 86dac330a5 Port vanilla block lighting and fluid rendering into the section mesher
Smooth lighting and ambient occlusion now follow BlockModelLighter
(cubic/partial faces, diagonal samples through light-permeable blocks,
light blending with the sky-borrow and zero rules, partial-face weights),
with vanilla's integer colour arithmetic, cardinal shading, quad light
emission, flat lighting for emitting or non-AO blocks, tint source counts
and random block offsets. Fluids follow FluidRenderer: occlusion against
neighbour face shapes, legacy-solid corner heights, flow-rotated UVs with
Mth.atan2 and the sine table, water overlay beside glass and leaves, back
faces and max(self, above) light. Flat model elements skip their
degenerate faces like UnbakedCuboidGeometry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:29:32 +02:00
Ludovic Marie ae96d36d1b Explosion, crit and damage-indicator particles
ParticleEngine gains ClientExplosionTracker-style explosion bursts,
TrackingEmitter and ServerLevel.sendParticles spreads; explode() and
Player.attack spawn them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:26:51 +02:00
Ludovic Marie 94539db425 Light with vanilla shape occlusion and incremental relighting
Port LightEngine.shapeOccludes / getFaceOcclusionShape (occlusion.nbt) so
slabs, stairs, snow layers, paths etc. block light directionally, and use
ChunkSkyLightSources.isEdgeOccluded for sky sources. Block light now rises
into the section above the highest occupied one.

Block edits on lit chunks are relit in place with vanilla's decrease and
increase passes instead of recomputing the 3x3 chunks (and remeshing every
section of them); edits that race a chunk light job are replayed onto it.

examples/light_parity compares Horizon light with the SkyLight/BlockLight
arrays of worlds saved by the vanilla 26.3 server (0 differences on
villages, outposts and a slab/stair/snow scene; 181 of 113M sky values
differ where vanilla's worldgen light is stale) and checks incremental
relighting against full relights. tools/vanilla_world_check.py runs the
vanilla server headless; tools/anvil_dump.py prints NBT and region chunks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:25:41 +02:00
Ludovic Marie 26acaf8ebd Port the vanilla particle engine and client animateTick effects
particles.rs becomes a ParticleEngine with ~80 vanilla particle types
(constructors, ticks, size curves, light, sprite sets from
particles/*.json) and camera-rotation quads. animate_tick.rs ports
ClientLevel.animateTick: torches, furnaces, campfires (with block-entity
smoke), candles, leaves drips and falling leaves, lava/water, fluid
drips, portals, enchanting tables, end rods, spore blossoms, redstone,
bubble columns and biome ambient particles. Rain splashes follow
tickWeatherEffects. Adds a particle control command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:24:12 +02:00
Ludovic Marie 7d26eca09a Draw potion icons with their colour and a masked enchantment glint
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:22:01 +02:00
Ludovic Marie 829b29d60c Fill generated structure containers in the client
Chests, trapped chests and barrels written by world generation become
client containers; their loot tables are unpacked with the loot module
using the generated LootTableSeed and the container's biome. chunkgen_bench
can list generated block entities (HORIZON_BLOCK_ENTITIES).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:20:42 +02:00
Ludovic Marie cc32d9e8a0 Grow trees and apply bone meal in the client; add block control commands
Install the live feature registry (sharing the generator's worldgen bundle),
route bone meal through BoneMealItem.useOn, report biome names and the world
seed to block behaviour, play the bone meal sound and pop items from tall
flowers. GameLevel::max_y is now exclusive as LevelAccess documents. New
horizon-ctl commands: setblock, fill, getblock, container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:20:22 +02:00
Ludovic Marie 1c7a68da26 Add enchanting, anvil, grindstone, smithing, stonecutter and brewing stand menus
Workstation menus follow the vanilla screens: slot layouts, sprites, the
enchanting table's seeded offers with clues and galactic names, anvil
rename/repair/combine costs, grindstone disenchanting with experience,
smithing upgrades and trims, stonecutter recipe buttons, and the brewing
stand block entity with data-driven recipes. Item tooltips show rarity,
enchantments, potion effects and trims; enchanted items glint.
horizon-ctl gains menu commands (use, click-slot, click-gui, type, xp, ...).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:17:11 +02:00
Ludovic Marie 67f51123e8 Add vanilla font metrics with unifont fallback, languages, styled text and a Brigadier command core
Font: bitmap glyph ascent/oversampling, unihex glyphs rasterized on demand
into a reserved atlas region, bold/italic/underline/strikethrough and
StringSplitter wrapping. Languages layer lang/<code>.json over en_us.
The command module ports Brigadier parsing, suggestions and smart usage
with the vanilla argument types and the 26.3 command tree; game rules
use the 26.3 registry names and saved-data file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:16:22 +02:00
Ludovic Marie 2940b5ac90 Add section mesh parity gate against the client's block and fluid renderers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:13:16 +02:00
Ludovic Marie ddf81d3d04 Render block entities: chests, shulker boxes, banners, skulls, bells, pots, conduits, books, copper golem statues
Sections now report their block-entity blocks; a new block_entity_render
module draws them each frame with vanilla's baked layer models, renderer
transforms, animations (chest lids, banner wave, enchanting-table book)
and entity diffuse lighting. Adds setblock/fill control commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:08:35 +02:00
Ludovic Marie eb87b65888 Export feature block behavior when preparing the native client
The 127 skipped placed features were all skipped because the worldgen bundle
lacked worldgen/blocks/{block-properties,cached-collision,cached-support}.nbt
and the survival definitions, which prepare_native_client.py only copied from
a previous simple-block parity run. Run the vanilla exporter directly when
those files are missing, and say so in the client when they are absent.
With them, every placed feature of the three dimensions runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:06:35 +02:00
Ludovic Marie 9d624d0175 Add item components (enchantments, name, potion, trim) and the enchantment registry
Item stacks carry vanilla's extra components, saved in chunk and player NBT.
The enchantment registry loads from the data pack with ordered tags, the
EnchantmentHelper cost/selection rules, value effects and level-based values,
and the anvil, grindstone, smithing and stonecutter result rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:03:28 +02:00
Ludovic Marie 072735b3ef Merge origin/wip/horizon-creative-tabs
Port the creative screen's Escape and E handling into key_pressed, which
the control socket shares with the window, and keep both exporter hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:51:15 +02:00
Ludovic Marie 77f9c075ca Add a control socket and horizon-ctl to drive the client from scripts
`--control` opens a local Unix socket; horizon-ctl sends text commands and
prints JSON replies. Scripts can read status, press keys and mouse buttons,
look, teleport, give items, change render distance, take PNG screenshots
of the presented frame, and benchmark frame times without a person at the
keyboard. Under control, losing focus no longer pauses the game.

Key presses and play-screen mouse buttons move into shared methods so the
window and the socket take the same paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:42:52 +02:00
Ludovic Marie f734f237cf WIP snapshot: creative inventory tabs and vanilla exporter
Uncommitted work from a finished agent worktree on ludothinkpad (/home/ludovic/.t3/worktrees/2026-10-03-i-want-you-to-retro-e5fa4461/t3code-ec3c613c), saved before the worktree was removed. Not built or verified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:20:17 +02:00
Ludovic Marie 08b8e71838 Drop Windows from scope and add a native client packager
Horizon now targets Linux and macOS only: remove the Windows CI runners and
wgpu's DX12 backend, and update the scope docs. The Ubuntu RTX 4080 desktop
becomes the first physical Linux target. tools/package_native_client.py bundles
a release build with its prepared resources and a launcher for playing on
another machine of the same platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:48:58 +02:00
Ludovic Marie af747818f1 Drive the world with vanilla block behaviour
Breaking, placing and block interaction now go through horizon-world's
level module (Level.setBlock with neighbour and shape updates,
BlockItem.place/getStateForPlacement, useWithoutItem), replacing the
client's ad-hoc placement. Each tick runs scheduled block and fluid
ticks, random ticks within the simulation distance, block events and
moving pistons, so water and lava flow, crops and grass grow, leaves
decay, redstone and pistons work, and unsupported blocks pop off. Level
events become destroy particles and sounds, loot drops, falling-block
entities (landing through FallingBlockEntity rules), menus, sleeping,
cake and TNT.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 03:38:31 +02:00
Ludovic Marie 146da2865a Add the Nether: portals, dimension travel and Nether rendering
Worlds now have dimensions with vanilla's per-dimension region folders
(DIM-1). The Nether generates with the vanilla generator, has no sky
light, Nether cardinal shading, its fixed ambient light, biome fog and
environmental fog (10..96), and no sky, sun or clouds. Lighting a fire
inside an obsidian frame creates a portal (PortalShape 2..21 x 3..21);
standing in it for 80 ticks (1 in creative) travels with 8:1 coordinate
scaling, reusing a nearby portal or building one (PortalForcer). The
player's dimension is saved in level.dat.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 03:29:47 +02:00
Ludovic Marie 29fee66f35 Beds: two-part placement, sleeping and respawn points
Beds place their head in the facing direction (undoing when blocked)
and break as a pair. Using a bed sets the respawn point and, at night
or in thunder with no monsters within 8 blocks, puts the player to
sleep; after 100 ticks the night is skipped and weather cleared, with
the vanilla sleep fade.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 03:01:18 +02:00
Ludovic Marie 2b72710268 Add weather: rain, snow and thunder
Port ServerLevel.advanceWeatherCycle (vanilla durations, smoothed rain
and thunder levels, saved in level.dat) and the WeatherAttributes rain
and thunder layers over the sky, fog, cloud, sky-light and star
attributes. Rain and snow columns render within 10 blocks down to the
first motion-blocking block, snowing where the biome is cold enough;
rain plays its ambient sounds, thunderstorms flash and thunder, and
undead no longer burn in the rain. Adds --weather for testing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:59:48 +02:00
Ludovic Marie 25dd5df9d5 Add options screen, options.txt and view bobbing
Options (FOV, render distance, sensitivity, master volume, GUI scale,
view bobbing) are reachable from the title and pause menus, use
vanilla's slider/button layout, apply immediately and persist in
options.txt with vanilla's keys and encodings. View bobbing ports
GameRenderer.bobView from the player's walk distance and bob.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-08 02:54:05 +02:00
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 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 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 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 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