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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
VanillaStructurePlacementOracle generates vanilla terrain with live
structure starts and references for the 3x3 chunks around a target, runs
the structure part of applyBiomeDecoration through a WorldGenRegion-like
level and dumps the target chunk's blocks and block entities. The
structure_blocks example does the same with Horizon's generator
(GeneratorWorker::set_structures_only skips placed features) and
tools/compare_structure_blocks.py reports the differences.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>
New horizon_world::loot: pools, weighted and nested entries, the item
modifiers chest tables use (counts, damage, random and level-based
enchanting, potions, stew effects, instruments, filtered/discard),
conditions, the stack splitter and the slot shuffle, all with vanilla's
random draw order. tools/compare_loot_fill.py runs a new vanilla oracle
(VanillaLootFillOracle) against the loot_fill example: all 58 chest
tables match slot for slot over 42 seeds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Primitive codecs (VarInt/VarLong, strings, positions, LpVec3, BitSets),
VarInt21 framing, zlib threshold compression, AES/CFB8 encryption, MD5
offline UUIDs, network NBT via horizon-world, item stacks with data
component patches, chunk and light payloads with paletted containers,
synched entity data, and typed packets for every connection state in both
directions with round-trip tests. Packet ids are generated from the data
generator's packets report. The probe example logs into a vanilla 26.3
server and decoded ~8000 packets (329 chunks) without errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port TreeGrower (all growers incl. 2x2 dark oak, pale oak, mega spruce/jungle,
mangrove, azalea, poplar), BoneMealItem.useOn/growCrop/growWaterPlant and every
BonemealableBlock. Configured and placed features run on the live level via a
FeatureWorld/PlacementContext adapter with vanilla setBlock semantics. Also fix
torchflower crops never maturing and kelp growth into flowing water.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port EndCityPieces' section generators (house towers, towers, bridges,
fat towers and the single ship), the local collision rule of
recursiveChildren and the treasure chest data markers. Seeds 1 and 12345
match vanilla on all 158 End starts over 601x601 chunks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Port NetherFortressPieces (bridge and castle piece weights, children,
moveInsideHeights, chests and the blaze spawner) and NetherFossilStructure
(noise-column floor search, template piece with the dried ghast). The
structure-start oracle and chunkgen_bench take a dimension; seeds 1 and
12345 match vanilla on 5024 of 5025 Nether starts over 301x301 chunks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vanilla_diff compares Rust-decorated chunks with region files of a vanilla
world generated for the same seed; chunkgen_bench takes --dimension.
configure_end_gateway stores the exit of end_gateway_return gateways instead
of failing the feature.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Everyday work is built and tested on Linux only. macOS and Windows jobs run only when started by hand (workflow_dispatch: gh workflow run <workflow> --ref <branch>), not on pull requests or pushes to main. Release workflows are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub releases were deleted; the Mac starter and packs are built with
tools/build_release.py instead of downloaded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Keep both branches' PieceWorld additions and one copy of the
StartContext::sea_level both added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>