Commit Graph

4750 Commits

Author SHA1 Message Date
Ludovic Marie 1efe0c4734 Record more player statistics
Picked up, dropped, crafted, used (placing blocks) and broken items,
damage dealt and taken, jumps, fish caught, animals bred, enchanting,
leaving the game, being killed by a mob, and opening chests, barrels,
shulker boxes, hoppers, droppers, dispensers and every crafting station
now count, as in vanilla.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 07:48:17 +02:00
Ludovic Marie a8cc848e79 Add the Statistics screen
The pause menu's Statistics button opens StatsScreen: the General tab
lists every custom statistic with vanilla's number, distance, time and
tenths formats, the Items tab the mined/broken/crafted/used/picked
up/dropped columns with sorting, and the Mobs tab kills and deaths per
mob. Teleports no longer count as distance travelled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 07:41:08 +02:00
Ludovic Marie 62c9acd18d Add phantoms and player statistics
Phantoms circle an anchor high above the player, swoop at them every
eight to twelve seconds, bite on contact and keep away from cats (which
hiss); they spawn over players who have not slept for three days. The
statistics behind that are tracked as vanilla does: play time, the
time-since counters, movement by kind, deaths, kills, blocks mined and
sleeps, saved to players/stats/<uuid>.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 07:34:28 +02:00
Ludovic Marie e5399b1613 Ride pigs and striders
Saddles fit adult pigs and striders; a saddled one can be ridden and
steered with a carrot or warped fungus on a stick, whose use boosts it
and wears the stick (a worn-out stick becomes a fishing rod). Saddles,
horse armour and donkey chests drop when their wearer dies, and saddled
pigs and striders keep their saddle in the save.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 07:25:01 +02:00
Ludovic Marie 3e2cdcae33 Make horses, donkeys and mules rideable
Horses get random health, speed and jump strength, coat colours with
markings, grazing, rearing and AbstractEquineModel's animation. Feeding
heals, grows foals and builds temper; riding an untamed horse ends with
it tamed or bucking the rider off. Saddles, horse armour and donkey
chests fit with a click, a saddled mount follows its rider with the
charged jump bar, its health replaces the food bar, and offspring
inherit their parents' stats (a horse and a donkey have a mule).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 07:19:19 +02:00
Ludovic Marie d6d9ecc4ab Give piglins, brutes, hoglins and zoglins their behaviour
Piglins leave gold-wearing players alone, pick up and admire gold, barter
gold ingots for a roll of the bartering table, fight with crossbows or
golden swords, hunt baby hoglins, flee zombified piglins and get angry
when their chests are opened or their gold mined. Brutes always attack.
Hoglins headbutt their targets into the air, babies flee, and both turn
into zombified piglins and zoglins after 15 seconds out of the Nether.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 06:58:11 +02:00
Ludovic Marie 35dacf6e24 Give pillagers crossbows and vindicators axes
Pillagers charge their crossbows, keep their range and fire; vindicators
hunt with iron axes (Johnny attacks everything). IllagerModel's crossed
arms, crossbow hold and charge, and weapon swings are ported, and a calm
vindicator hides its axe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 06:49:17 +02:00
Ludovic Marie 71f6d80613 Give iron and snow golems their behaviour
Iron golems hunt monsters (not creepers), close in, swing for a random
half to one and a half times their damage and throw the target up, show
cracks as they weaken, take iron ingots for repairs, offer poppies to
villagers and hold a grudge against a player who hits them. Snow golems
pelt monsters with snowballs, leave a snow trail and melt in hot biomes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 06:44:57 +02:00
Ludovic Marie 459db087d6 Make zombified piglins neutral
They no longer attack on sight: once hit they stay angry for 20 to 39
seconds, move faster, growl and rally the others nearby. They spawn with
golden swords.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 06:35:50 +02:00
Ludovic Marie 7d136d665f Give blazes and ghasts their attacks, and fix moved textures
Blazes hover toward targets above them, slow their fall, smoke and fire
three-fireball volleys; ghasts float about, face their target, cry and
shoot exploding fireballs credited to them. The blaze rods spin and ghast
tentacles sway. Blazes, endermites, silverfish, experience orbs and the
fishing bobber pointed at texture paths 26.3 moved, so they were
invisible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 06:31:25 +02:00
Ludovic Marie c44174d261 Make cats tamable
Cats get their variants, collars and the feline model's sitting,
crouching, sprinting and lying poses. Wild cats flee players unless
tempted with fish, which may tame them; tame cats sit on command, follow
their owner, lie on beds, sit on chests and lit furnaces, stalk rabbits
and have tame kittens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 06:18:40 +02:00
Ludovic Marie ac8bc36427 Fix the poison interval test for the poison action
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 06:14:45 +02:00
Ludovic Marie 3e556f51ef Make wolves tamable
Wolves get their biome variants, the tame and angry textures, the collar
layer and WolfModel's sitting, begging and shaking poses. Bones tame them;
tame wolves sit on command, follow and teleport to their owner, defend it
and join its fights, heal on meat, take collar dyes and breed into tame
pups. Mob particle bursts (hearts, smoke, splashes) now show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 06:10:08 +02:00
Ludovic Marie 6060e0dfda Give witches, endermen and slimes their vanilla AI
Wire the paused witch, enderman and cube-mob modules: witches drink and
throw potions, endermen teleport, stare-aggro and carry blocks, slimes and
magma cubes hop with their size, squish and split. Slime sizes save, the
outer slime layer renders, and mob-applied effects use the player's effect
list (so they show and tick like potions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 05:53:04 +02:00
Ludovic Marie 41667216a2 Add vanilla death messages
A combat tracker records the player's damage, its causing mob and the
fall, and builds CombatTracker's message: falls from ladders or high
places, assisted falls, being slain or shot by a named mob, kill credit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 05:29:25 +02:00
Ludovic Marie 34f9cb83fd Add adventure and spectator modes
Spectators fly through blocks without overlays, a hotbar or a hand, and
do not interact, pick up items or trigger plates; adventure players cannot
build. The game mode is saved and restored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 05:20:25 +02:00
Ludovic Marie 183008d876 Place end crystals and respawn the dragon
Four crystals on the exit portal rebuild the pillars one by one and bring
the dragon back, as DragonRespawnStage does; breaking one of them aborts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 05:09:50 +02:00
Ludovic Marie e28d1a5890 Add the ender dragon fight
The dragon with its phases, path nodes, fireballs and breath, end crystals
that heal it, the boss bar and boss music, and the kill: XP, the exit
portal, the egg and a new gateway. The fight state is saved where 26.3
saves it. Creative players are now invulnerable, as in vanilla.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 04:59:58 +02:00
Ludovic Marie bea383078a Save maps where 26.3 does
Map data now lives in data/minecraft/maps/<id>.dat and the id counter in
data/minecraft/maps/last_id.dat (SavedDataStorage resolving the
minecraft:maps/<id> and maps/last_id identifiers), so vanilla and Horizon
read each other's maps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 04:34:33 +02:00
Ludovic Marie f63cac5f5e Add tadpoles, frog variants and saved mob ages
Frogspawn hatches into 2-5 tadpoles that swim, flop on land, wag their
tails and grow into frogs after 24000 ticks. Frogs take the warm, cold or
temperate variant from the biome. AgeableMob ages (babies, breeding
cooldowns) are now saved and loaded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 04:31:16 +02:00
Ludovic Marie 7fd50eb00b Add books and lecterns
Books and quills open BookEditScreen: pages of 14 lines of 114 pixels and
1024 characters, up to 100 pages, page buttons that add pages, Done and
the signing screen (15-character title, finalize warning) that turns the
book into a written book by the player. Written books open BookViewScreen.
Lecterns take a book, open LecternScreen with Take Book, send a 2-tick
redstone pulse on page turns (with the library's unpowering tick) and drive
comparators from the page. Both book components and the lectern block
entity are saved; open book and sign screens no longer pause on focus loss.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 04:24:45 +02:00
Ludovic Marie dd2f4209e5 Add the cartography table and close menus on quit
CartographyTableMenu: zooming a map out with paper (a fresh map one scale
up), cloning it with an empty map, and locking it with a glass pane, the
new map ids made when the result is taken, the take sound, and the screen's
previews with the error and lock sprites. Quitting now closes the open
menu first so its items go back to the inventory, and map textures upload
with the drawn frame's HUD batch only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 04:13:27 +02:00
Ludovic Marie 3c6c041851 Add maps
Empty maps create a map centred on the player's grid cell; held maps reveal
the world with MapItem.update (dominant map colour per pixel, height and
water-depth shading, the dithered edge, the ceiling noise in the Nether)
and carried maps track the player marker. Maps save as data/map_<id>.dat
with idcounts.dat, their 128x128 textures live in reserved atlas slots,
and they render held in both hands over the map background and full-face
in item frames (the map=true frame models). Block facts now carry the
MapColor id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 04:02:14 +02:00
Ludovic Marie 84e2e6e5c6 Add beacons
BeaconBlockEntity: beam sections tinted and blended by stained glass,
pyramid levels from beacon_base_blocks every 80 ticks, primary and
secondary powers for players in range (amplified when doubled), and the
activate, ambient, deactivate and power-select sounds; saved with the
vanilla keys. The 230x219 BeaconScreen has the power buttons, the upgrade
button, payment slot and confirm/cancel. BeaconRenderer's rotating beam and
glow scroll through a new wrapped-sprite mode of the entity shader.
/setblock and /fill now replace block entities with the new block's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 03:50:36 +02:00
Ludovic Marie c062f41892 Add real lightning bolts
Thunderstorms now roll ServerLevel.tickThunder per chunk: the bolt strikes
the top of the column or a living entity under open sky nearby, may bring a
skeleton trap horse, and LightningBolt ticks its flashes with the thunder
and impact sounds, fire, lightning rods and thunderHit (5 damage and
burning, charged creepers with their energy swirl, zombified piglins,
witches, mooshroom colours, turtles, burnt items). The bolt is drawn by
LightningBoltRenderer's layered branches through a new additive entity
pipeline, and /summon accepts lightning bolts and minecarts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 03:33:30 +02:00
Ludovic Marie 95149579ff Add minecarts, jukeboxes, name tags and outline-shape picking
Minecarts follow OldMinecartBehavior: rails and slopes, powered and
activator rails, coming off the track, the rider's push, players and carts
pushing each other, placement, breaking and saving, with chest and hopper
containers, furnace fuel and push, and TNT priming and explosions. They
render on the rail between the front and back points with their display
block.

Jukeboxes take jukebox_playable discs, play the song with the rainbow Now
Playing overlay and note particles, emit 15 while playing, drive
comparators, eject the disc and save it.

Name tags name mobs (saved as CustomName); the name shows above the head on
a translucent background when targeted or always visible, and Dinnerbone
and Grumm render upside down.

Blocks are now picked and outlined with their vanilla outline shapes
(exported per state with the edges LevelRenderer draws), so rails, slabs,
torches and plants no longer act as full cubes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 03:21:40 +02:00
Ludovic Marie 85a11b071f Add firework rockets and item components in /give
Rockets launch from a clicked block or boost a gliding player, fly with the
1.15 acceleration and 0.04 lift for 10*(flight+1)+rand(6)+rand(7) ticks, then
explode: 5+2n damage within 5 blocks with line of sight, and the client
starter spawns the shaped spark bursts, trails, twinkles and blast sounds.
/give now applies its [component=value] list through a new SNBT parser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:42:40 +02:00
Ludovic Marie 776e5c354f Add elytra gliding and right-click armor equipping
Jumping in the air with a usable glider starts fall flying (the
FALL_FLYING pose), travelFallFlying applies vanilla's lift, dive
conversion, climb and 0.99/0.98 drag, the elytra wears every 20 ticks
of flight, and gliding stops on landing or when it can no longer glide.
Right-clicking swappable armor equips it (Equippable.swapWithEquipmentSlot),
returning the worn piece, honouring Curse of Binding and playing the
equip sound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:28:28 +02:00
Ludovic Marie b80bc19b57 Add creative flight
Double-tapping jump within seven ticks toggles flight (jumping off the
ground when it starts), jump and sneak move up and down at three times
the 0.05 flying speed, horizontal acceleration uses the flying speed
(doubled while sprinting), Player.travel keeps 0.6 of the vertical speed,
flight ends on landing, and flying players neither crouch nor take fall
damage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:22:40 +02:00
Ludovic Marie 499415fb50 Simplify the trident's drag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:17:05 +02:00
Ludovic Marie 595fa83865 Add tridents
Throwing after ten ticks (one durability, kept in creative), Riptide
launches in water or rain, and the thrown trident's flight, 8 damage plus
Impaling against aquatic mobs, reversed bounce, sticking, Loyalty return,
pickup and ThrownTridentRenderer. horizon-ctl status also reports the
item in use and thrown tridents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:16:45 +02:00
Ludovic Marie 5b05edcda4 Add crossbows
Charging over 1.25 s less Quick Charge with the loading sounds, loading
arrows into charged_projectiles (three with Multishot, one arrow used),
and shooting critical arrows at power 3.15 fanned 10 degrees apart with
vanilla's shot pitches and durability use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:09:04 +02:00
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 ebb1180bd5 Merge pull request #38 from ludovic111/t3/minecraft-parity
Merge the parity work: 55% -> 71% Java parity
2026-10-09 00:00:58 +02:00